45 GUIInputInternalNode::GUIInputInternalNode(
53 const string& backgroundImage,
55 const GUIColor& backgroundImageEffectColorMul,
56 const GUIColor& backgroundImageEffectColorAdd,
61 const string& tooltip,
65 const string& colorDisabled,
69 GUINode(screenNode, parentNode, id, flow, alignments, requestedConstraints, backgroundColor, backgroundImage, backgroundImageScale9Grid, backgroundImageEffectColorMul, backgroundImageEffectColorAdd, border, padding, showOn, hideOn, tooltip)
76 if (this->font !=
nullptr) this->font->initialize();
89 Console::print(
string(
"GUIInputInternalNode::createMaxLength(): An error occurred: "));
90 Console::println(
string(exception.what()));
126 auto inputInternalController = required_dynamic_cast<GUIInputInternalController*>(this->
getController());
128 auto inputNodeController = required_dynamic_cast<GUIInputController*>(inputNode->getController());
129 auto disable = inputNodeController->isDisabled();
130 auto index = inputInternalController->getIndex();
131 auto selectionIndex = inputInternalController->getSelectionIndex();
132 if (
font !=
nullptr) {
138 inputInternalController->getOffset(),
141 selectionIndex == -1 || selectionIndex == index?-1:Math::min(selectionIndex, index),
142 selectionIndex == -1 || selectionIndex == index?-1:Math::max(selectionIndex, index),
143 inputNode->getBackgroundColor()
148 inputInternalController->isShowCursor() ==
true &&
150 (selectionIndex == -1 || selectionIndex == index)) {
160 ((left) / (screenWidth / 2.0f)) - 1.0f,
161 ((screenHeight - top) / (screenHeight / 2.0f)) - 1.0f,
168 ((left + width) / (screenWidth / 2.0f)) - 1.0f,
169 ((screenHeight - top) / (screenHeight / 2.0f)) - 1.0f,
176 ((left + width) / (screenWidth / 2.0f)) - 1.0f,
177 ((screenHeight - top - height) / (screenHeight / 2.0f)) - 1.0f,
184 ((left) / (screenWidth / 2.0f)) - 1.0f,
185 ((screenHeight - top - height) / (screenHeight / 2.0f)) - 1.0f,
GUIElementNode * getFocussedNode()
GUI element node conditions.
GUI node controller base class.
friend class GUIInputInternalController
virtual void render(GUIRenderer *guiRenderer)
Render.
unique_ptr< GUINodeController > controller
GUINode_ComputedConstraints computedConstraints
GUINodeController * getController()
GUIScreenNode * screenNode
bool shouldRender()
Returns if to render.
GUIParentNode * getParentControllerNode()
virtual void dispose()
Dispose node.
void setController(GUINodeController *controller)
Set up node controller.
GUI parent node base class thats supporting child nodes.
GUI screen node that represents a screen that can be rendered via GUI system.
GUIFont * getFont(const string &fileName, int size)
Get font.
void drawString(GUIRenderer *guiRenderer, int x, int y, const MutableString &text, int offset, int length, const GUIColor &color, int selectionStartIndex=-1, int selectionEndIndex=-1, const GUIColor &backgroundColor=GUIColor::GUICOLOR_TRANSPARENT)
Draw string.
int getTextIndexX(const MutableString &text, int offset, int length, int index)
Get text index X of given text and index.
int getTextWidth(const MutableString &text)
Text width.
void bindTexture(int32_t textureId)
Bind texture.
void addQuad(float x1, float y1, float colorR1, float colorG1, float colorB1, float colorA1, float tu1, float tv1, float x2, float y2, float colorR2, float colorG2, float colorB2, float colorA2, float tu2, float tv2, float x3, float y3, float colorR3, float colorG3, float colorB3, float colorA3, float tu3, float tv3, float x4, float y4, float colorR4, float colorG4, float colorB4, float colorA4, float tu4, float tv4, bool solidColor=false, bool rotated=false)
Add quad Note: quad vertices order 1 2 +-—+ | | | | +-—+ 4 3.
Mutable utf8 aware string class.
std::exception Exception
Exception base class.
GUI node computed constraints.
GUI node requested constraints entity.
GUI node scale 9 grid entity.