28 virtual void Create()
override;
29 virtual void Start()
override;
31 virtual void Tick(
float deltaTime)
override;
40 void SetConfirmText(
const std::string& text);
41 const std::string& GetConfirmText()
const;
42 void SetConfirmNormalColor(glm::vec4 color);
43 glm::vec4 GetConfirmNormalColor()
const;
44 void SetConfirmHoveredColor(glm::vec4 color);
45 glm::vec4 GetConfirmHoveredColor()
const;
46 void SetConfirmPressedColor(glm::vec4 color);
47 glm::vec4 GetConfirmPressedColor()
const;
48 void SetConfirmTexture(
Texture* texture);
50 void SetShowConfirmButton(
bool show);
51 bool GetShowConfirmButton()
const;
54 void SetRejectText(
const std::string& text);
55 const std::string& GetRejectText()
const;
56 void SetRejectNormalColor(glm::vec4 color);
57 glm::vec4 GetRejectNormalColor()
const;
58 void SetRejectHoveredColor(glm::vec4 color);
59 glm::vec4 GetRejectHoveredColor()
const;
60 void SetRejectPressedColor(glm::vec4 color);
61 glm::vec4 GetRejectPressedColor()
const;
62 void SetRejectTexture(
Texture* texture);
64 void SetShowRejectButton(
bool show);
65 bool GetShowRejectButton()
const;
68 void SetButtonBarHeight(
float height);
69 float GetButtonBarHeight()
const;
70 void SetButtonSpacing(
float spacing);
71 float GetButtonSpacing()
const;
74 void SetButtonBarColor(glm::vec4 color);
75 glm::vec4 GetButtonBarColor()
const;
76 void SetButtonWidth(
float width);
77 float GetButtonWidth()
const;
78 void SetButtonBarPadding(
float padding);
79 float GetButtonBarPadding()
const;
84 void RefreshButtonBar();
88 Button* GetConfirmButton();
94 static void OnConfirmButtonActivated(
Node* listener,
const std::vector<Datum>& args);
95 static void OnRejectButtonActivated(
Node* listener,
const std::vector<Datum>& args);
96 void EnsureButtonBar();
97 void UpdateButtonBar();
100 std::string mConfirmText =
"Confirm";
101 glm::vec4 mConfirmNormalColor = glm::vec4(0.2f, 0.5f, 0.2f, 1.0f);
102 glm::vec4 mConfirmHoveredColor = glm::vec4(0.3f, 0.6f, 0.3f, 1.0f);
103 glm::vec4 mConfirmPressedColor = glm::vec4(0.15f, 0.4f, 0.15f, 1.0f);
105 bool mShowConfirmButton =
true;
108 std::string mRejectText =
"Cancel";
109 glm::vec4 mRejectNormalColor = glm::vec4(0.5f, 0.2f, 0.2f, 1.0f);
110 glm::vec4 mRejectHoveredColor = glm::vec4(0.6f, 0.3f, 0.3f, 1.0f);
111 glm::vec4 mRejectPressedColor = glm::vec4(0.4f, 0.15f, 0.15f, 1.0f);
113 bool mShowRejectButton =
true;
116 float mButtonBarHeight = 40.0f;
117 float mButtonSpacing = 10.0f;
118 float mButtonWidth = 80.0f;
119 float mButtonBarPadding = 8.0f;
121 glm::vec4 mButtonBarColor = glm::vec4(0.18f, 0.18f, 0.25f, 1.0f);
125 Quad* mButtonBarBackground =
nullptr;
128 bool mButtonSignalsConnected =
false;