TDME2 1.9.121
GUIProgressBarController.h
Go to the documentation of this file.
1#pragma once
2
3#include <tdme/tdme.h>
9
16
17/**
18 * GUI progress bar controller
19 * @author Andreas Drewke
20 * @version $Id$
21 */
23{
24 friend class GUIProgressBar;
25
26private:
27 GUIImageNode* barNode { nullptr };
28 GUITextNode* textNode { nullptr };
29 bool disabled { false };
30 float valueFloat { 0.0f };
32
33 /**
34 * Private constructor
35 * @param node node
36 */
38
39 /**
40 * Update bar
41 */
42 void updateBar();
43
44public:
45 // overridden methods
46 bool isDisabled() override;
47 void setDisabled(bool disabled) override;
48 void initialize() override;
49 void dispose() override;
50 void postLayout() override;
51 void handleMouseEvent(GUINode* node, GUIMouseEvent* event) override;
52 void handleKeyboardEvent(GUIKeyboardEvent* event) override;
53 void tick() override;
54 void onFocusGained() override;
55 void onFocusLost() override;
56 bool hasValue() override;
57 const MutableString& getValue() override;
58 void setValue(const MutableString& value) override;
59
60};
void initialize() override
Initialize controller after element has been created.
void handleKeyboardEvent(GUIKeyboardEvent *event) override
Handle keyboard event.
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.
GUIProgressBarController(GUINode *node)
Private constructor.
GUI node base class.
Definition: GUINode.h:63
Mutable string class.
Definition: MutableString.h:16