17 virtual void Create()
override;
19 virtual void Tick(
float deltaTime)
override;
20 virtual void EditorTick(
float deltaTime)
override;
24 void AddOption(
const std::string& option);
25 void RemoveOption(int32_t index);
27 void SetOptions(
const std::vector<std::string>& options);
28 const std::vector<std::string>& GetOptions()
const;
29 int32_t GetOptionCount()
const;
32 void SetSelectedIndex(int32_t index);
33 int32_t GetSelectedIndex()
const;
34 std::string GetSelectedOption()
const;
43 void SetBackgroundColor(glm::vec4 color);
44 glm::vec4 GetBackgroundColor();
45 void SetTextColor(glm::vec4 color);
46 glm::vec4 GetTextColor();
47 void SetDropdownColor(glm::vec4 color);
48 glm::vec4 GetDropdownColor();
49 void SetHoveredColor(glm::vec4 color);
50 glm::vec4 GetHoveredColor();
51 void SetMaxVisibleItems(int32_t count);
52 int32_t GetMaxVisibleItems()
const;
55 Quad* GetBackground();
56 Text* GetTextWidget();
59 static void SetHandleMouse(
bool inHandle);
60 static void SetHandleKeyboard(
bool inHandle);
61 static void SetHandleGamepad(
bool inHandle);
65 void CycleSelectedIndex(int32_t delta);
66 void CycleHoveredIndex(int32_t delta);
70 void UpdateAppearance();
71 void UpdateDropdown();
72 void CreateDropdownItems();
73 void DestroyDropdownItems();
74 void SyncOptionsString();
79 int32_t mSelectedIndex = -1;
83 int32_t mHoveredIndex = -1;
84 int32_t mScrollOffset = 0;
88 glm::vec4 mBackgroundColor = { 0.25f, 0.25f, 0.25f, 1.0f };
89 glm::vec4 mTextColor = { 1.0f, 1.0f, 1.0f, 1.0f };
90 glm::vec4 mDropdownColor = { 0.2f, 0.2f, 0.2f, 1.0f };
91 glm::vec4 mHoveredColor = { 0.35f, 0.35f, 0.35f, 1.0f };
92 glm::vec4 mArrowColor = { 0.7f, 0.7f, 0.7f, 1.0f };
93 float mArrowWidth = 20.0f;
94 float mItemHeight = 24.0f;
95 int32_t mMaxVisibleItems = 5;
98 Quad* mBackground =
nullptr;