14 virtual void Create()
override;
16 virtual void Tick(
float deltaTime)
override;
17 virtual void EditorTick(
float deltaTime)
override;
21 void SetTitle(
const std::string& title);
22 const std::string& GetTitle()
const;
23 void SetTitleWidth(
float width);
24 float GetTitleWidth()
const;
27 void SetText(
const std::string& text);
28 const std::string& GetText()
const;
29 void SetPlaceholder(
const std::string& placeholder);
30 const std::string& GetPlaceholder()
const;
33 void SetCaretPosition(int32_t pos);
34 int32_t GetCaretPosition()
const;
36 void ClearSelection();
37 bool HasSelection()
const;
38 std::string GetSelectedText()
const;
39 void DeleteSelection();
40 void Select(int32_t start, int32_t end);
41 int32_t GetSelectionStart()
const;
42 int32_t GetSelectionEnd()
const;
45 void SetFocused(
bool focused);
46 bool IsFocused()
const;
49 void SetPasswordMode(
bool enabled);
50 bool IsPasswordMode()
const;
51 void SetMaxLength(int32_t maxLen);
52 int32_t GetMaxLength()
const;
53 void SetEditable(
bool editable);
54 bool IsEditable()
const;
57 Text* GetTitleWidget();
67 std::string mTitle =
"Label";
68 float mTitleWidth = 100.0f;
69 float mSpacing = 8.0f;
70 glm::vec4 mTitleColor = { 1.0f, 1.0f, 1.0f, 1.0f };
73 Text* mTitleWidget =
nullptr;