31 string GUIInputController::CONDITION_DISABLED =
"disabled";
32 string GUIInputController::CONDITION_ENABLED =
"enabled";
34 GUIInputController::GUIInputController(
GUINode* node)
37 this->
disabled = required_dynamic_cast<GUIElementNode*>(
node)->isDisabled();
41 auto& nodeConditions = required_dynamic_cast<GUIElementNode*>(
node)->getActiveConditions();
43 if (nodeConditions.has(
"hint") ==
false) nodeConditions.add(
"hint");
45 if (nodeConditions.has(
"hint") ==
true) nodeConditions.remove(
"hint");
56 auto& nodeConditions = required_dynamic_cast<GUIElementNode*>(
node)->getActiveConditions();
67 GUIElementController::initialize();
75 GUIElementController::dispose();
84 GUIElementController::handleMouseEvent(
node, event);
87 event->setProcessed(
true);
97 GUIElementController::tick();
125 auto inputInternalController = required_dynamic_cast<GUIInputInternalController*>(
inputNode->
getController());
126 inputInternalController->formatText();
127 inputInternalController->onTextUpdate();
void setFoccussedNode(GUIElementNode *newFoccussedNode)
Set focussed node.
GUI element node conditions.
virtual void onFocusLost()=0
On focus lost.
virtual void onFocusGained()=0
On focus gained.
bool isEventBelongingToNode(GUIMouseEvent *event, Vector2 &nodeCoordinate)
Is event belonging to node.
GUINodeController * getController()
GUIScreenNode * getScreenNode()
GUI screen node that represents a screen that can be rendered via GUI system.
GUINode * getNodeById(const string &nodeId)
Get GUI node by id.
Mutable utf8 aware string class.
const string & getString() const
MutableString & set(char c)
Set character.