59 GUIElementController::initialize();
63 GUIElementController::dispose();
71 GUIElementController::handleMouseEvent(
node, event);
72 if (
node == this->node &&
73 event->
getType() == GUIMouseEvent::MOUSEEVENT_RELEASED ==
true) {
75 event->setProcessed(
true);
78 event->
getType() == GUIMouseEvent::MOUSEEVENT_PRESSED ==
true &&
81 event->setProcessed(
true);
83 if (event->
getType() == GUIMouseEvent::MOUSEEVENT_DRAGGED ==
true &&
93 event->setProcessed(
true);
98 GUIElementController::handleKeyboardEvent(event);
100 case GUIKeyboardEvent::KEYCODE_LEFT: {
101 event->setProcessed(
true);
102 if (event->
getType() == GUIKeyboardEvent::KEYBOARDEVENT_KEY_PRESSED) {
109 case GUIKeyboardEvent::KEYCODE_RIGHT: {
110 event->setProcessed(
true);
111 if (event->
getType() == GUIKeyboardEvent::KEYBOARDEVENT_KEY_PRESSED) {
122 GUIElementController::tick();
146 required_dynamic_cast<GUIImageNode*>(
knobNode)->setTextureMatrix(Matrix2D3x3::rotateAroundTextureCenter((-
valueFloat * (360.0f - 60.0f)) - 210.f));
void setFoccussedNode(GUIElementNode *newFoccussedNode)
Set focussed node.
void updateKnob()
Update knob.
void onFocusGained() override
On focus gained.
void dispose() override
Dispose controller.
void postLayout() override
Post layout event.
void initialize() override
Initialize controller after element has been created.
void handleKeyboardEvent(GUIKeyboardEvent *event) override
Handle keyboard event.
void onFocusLost() override
On focus lost.
void setValue(const MutableString &value) override
Set value.
void handleMouseEvent(GUINode *node, GUIMouseEvent *event) override
Handle mouse event.
void tick() override
Tick method will be executed once per frame.
void setDisabled(bool disabled) override
Set disabled.
const MutableString & getValue() override
bool isDisabled() override
GUIKeyboardEventType getType()
GUIMouseEventType getType()
bool isEventBelongingToNode(GUIMouseEvent *event, Vector2 &position)
Is event belonging to node.
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.
void delegateValueChanged(GUIElementNode *node)
Delegate value changed.
MutableString & set(char c)
Set character.
const string & getString() const