15 virtual void Create()
override;
17 virtual void Tick(
float deltaTime)
override;
18 virtual void EditorTick(
float deltaTime)
override;
22 void SetChecked(
bool checked);
23 bool IsChecked()
const;
27 void SetText(
const std::string& text);
28 const std::string& GetText()
const;
31 void SetCheckedTexture(
Texture* texture);
33 void SetUncheckedTexture(
Texture* texture);
35 void SetCheckedColor(glm::vec4 color);
36 glm::vec4 GetCheckedColor();
37 void SetUncheckedColor(glm::vec4 color);
38 glm::vec4 GetUncheckedColor();
39 void SetTextColor(glm::vec4 color);
40 glm::vec4 GetTextColor();
41 void SetBoxSize(
float size);
42 float GetBoxSize()
const;
43 void SetSpacing(
float spacing);
44 float GetSpacing()
const;
48 Text* GetTextWidget();
54 void UpdateAppearance();
57 bool mChecked =
false;
60 std::string mTextContent =
"CheckBox";
65 glm::vec4 mCheckedColor = { 0.3f, 0.7f, 0.3f, 1.0f };
66 glm::vec4 mUncheckedColor = { 0.4f, 0.4f, 0.4f, 1.0f };
67 glm::vec4 mHoveredColor = { 0.5f, 0.5f, 0.5f, 1.0f };
68 glm::vec4 mTextColor = { 1.0f, 1.0f, 1.0f, 1.0f };
69 float mBoxSize = 20.0f;
70 float mSpacing = 8.0f;
73 bool mHovered =
false;