26 virtual void Create()
override;
28 virtual void Tick(
float deltaTime)
override;
30 void UpdateAppearance();
32 bool IsSelected()
const;
33 virtual void Activate();
38 void SetNormalTexture(
Texture* texture);
39 void SetHoveredTexture(
Texture* texture);
40 void SetPressedTexture(
Texture* texture);
41 void SetLockedTexture(
Texture* texture);
48 void SetNormalColor(glm::vec4 color);
49 void SetHoveredColor(glm::vec4 color);
50 void SetPressedColor(glm::vec4 color);
51 void SetLockedColor(glm::vec4 color);
53 glm::vec4 GetNormalColor();
54 glm::vec4 GetHoveredColor();
55 glm::vec4 GetPressedColor();
56 glm::vec4 GetLockedColor();
58 void SetUseQuadStateColor(
bool inUse);
59 void SetUseTextStateColor(
bool inUse);
60 static void SetHandleMouse(
bool inHandle);
61 static void SetHandleGamepad(
bool inHandle);
62 static void SetHandleKeyboard(
bool inHandle);
64 void EnableRightClickPress(
bool enable);
65 bool IsRightClickPressEnabled();
67 virtual void SetTextString(
const std::string& newTextString);
68 const std::string& GetTextString()
const;
70 void SetNavUp(
Node* up);
71 void SetNavDown(
Node* down);
72 void SetNavLeft(
Node* left);
73 void SetNavRight(
Node* right);
83 void SetUvScale(glm::vec2 scale);
84 glm::vec2 GetUvScale()
const;
85 void SetUvOffset(glm::vec2 offset);
86 glm::vec2 GetUvOffset()
const;
92 static Button* GetSelectedButton();
93 static void SetSelectedButton(
Button* button);
95 static void StaticUpdate();
106 glm::vec4 mNormalColor = { 0.5f, 0.5f, 0.5f, 1.0f };
107 glm::vec4 mHoveredColor = { 0.6f, 0.6f, 0.6f, 1.0f };
108 glm::vec4 mPressedColor = { 0.4, 0.4f, 0.4f, 1.0f };
109 glm::vec4 mLockedColor = { 0.2f, 0.2f, 0.2f, 1.0f };
113 glm::vec2 mUvScale = glm::vec2(1.0f, 1.0f);
114 glm::vec2 mUvOffset = glm::vec2(0.0f, 0.0f);
116 bool mUseTextStateColor =
false;
117 bool mUseQuadStateColor =
true;
118 bool mAutoSizeText =
false;
119 bool mRightClickPress =
false;
120 glm::vec2 mTextPaddingRatio = { 0.035f, 0.05f };