27 virtual void Create()
override;
28 virtual void Start()
override;
29 virtual void Stop()
override;
31 virtual void Tick(
float deltaTime)
override;
36 void SetWindowId(
const std::string&
id);
37 const std::string& GetWindowId()
const;
40 void SetTitle(
const std::string& title);
41 const std::string& GetTitle()
const;
44 void SetTitleFontSize(
float size);
45 float GetTitleFontSize()
const;
46 void SetTitleOffset(glm::vec2 offset);
47 glm::vec2 GetTitleOffset()
const;
50 void SetContentPadding(
float left,
float top,
float right,
float bottom);
51 void SetContentPaddingLeft(
float left);
52 void SetContentPaddingTop(
float top);
53 void SetContentPaddingRight(
float right);
54 void SetContentPaddingBottom(
float bottom);
55 float GetContentPaddingLeft()
const;
56 float GetContentPaddingTop()
const;
57 float GetContentPaddingRight()
const;
58 float GetContentPaddingBottom()
const;
64 void SetStartHidden(
bool hidden);
65 bool GetStartHidden()
const;
68 void SetDraggable(
bool draggable);
69 bool IsDraggable()
const;
70 void SetResizable(
bool resizable);
71 bool IsResizable()
const;
72 void SetShowCloseButton(
bool show);
73 bool GetShowCloseButton()
const;
74 void SetShowTitleBar(
bool show);
75 bool GetShowTitleBar()
const;
76 void SetTitleBarHeight(
float height);
77 float GetTitleBarHeight()
const;
78 void SetMinSize(glm::vec2 minSize);
79 glm::vec2 GetMinSize()
const;
80 void SetMaxSize(glm::vec2 maxSize);
81 glm::vec2 GetMaxSize()
const;
82 void SetResizeHandleSize(
float size);
83 float GetResizeHandleSize()
const;
86 void SetContentWidget(
Widget* widget);
90 Widget* GetContentWidget();
93 void SetTitleBarColor(glm::vec4 color);
94 glm::vec4 GetTitleBarColor()
const;
95 void SetBackgroundColor(glm::vec4 color);
96 glm::vec4 GetBackgroundColor()
const;
99 void SetBackgroundTexture(
Texture* texture);
100 Texture* GetBackgroundTexture();
101 void SetBackgroundUVScale(glm::vec2 scale);
102 glm::vec2 GetBackgroundUVScale()
const;
103 void SetBackgroundUVOffset(glm::vec2 offset);
104 glm::vec2 GetBackgroundUVOffset()
const;
105 void SetTitleBarTexture(
Texture* texture);
107 void SetTitleBarUVScale(glm::vec2 scale);
108 glm::vec2 GetTitleBarUVScale()
const;
109 void SetTitleBarUVOffset(glm::vec2 offset);
110 glm::vec2 GetTitleBarUVOffset()
const;
111 void SetCloseButtonTexture(
Texture* texture);
112 Texture* GetCloseButtonTexture();
115 void SetCloseButtonNormalColor(glm::vec4 color);
116 glm::vec4 GetCloseButtonNormalColor()
const;
117 void SetCloseButtonHoveredColor(glm::vec4 color);
118 glm::vec4 GetCloseButtonHoveredColor()
const;
119 void SetCloseButtonPressedColor(glm::vec4 color);
120 glm::vec4 GetCloseButtonPressedColor()
const;
124 Text* GetTitleText();
126 Quad* GetResizeHandle();
127 Quad* GetBackground();
136 void EnsureContentContainer();
137 void RerouteChildrenToContent();
144 std::string mTitle =
"Window";
146 float mTitleFontSize = 14.0f;
147 glm::vec2 mTitleOffset = glm::vec2(0.0f,-8.0f);
148 float mTitleBarHeight = 24.0f;
149 float mContentPaddingLeft = 0.0f;
150 float mContentPaddingTop = 0.0f;
151 float mContentPaddingRight = 0.0f;
152 float mContentPaddingBottom = 0.0f;
153 bool mDraggable =
true;
154 bool mResizable =
true;
155 bool mShowCloseButton =
true;
156 bool mShowTitleBar =
true;
157 bool mStartHidden =
false;
158 float mResizeHandleSize = 12.0f;
159 glm::vec2 mMinSize = glm::vec2(100.0f, 80.0f);
160 glm::vec2 mMaxSize = glm::vec2(0.0f);
161 glm::vec4 mTitleBarColor = glm::vec4(0.2f, 0.2f, 0.3f, 1.0f);
162 glm::vec4 mBackgroundColor = glm::vec4(0.15f, 0.15f, 0.2f, 0.95f);
166 glm::vec2 mBackgroundUVScale = glm::vec2(1.0f, 1.0f);
167 glm::vec2 mBackgroundUVOffset = glm::vec2(0.0f, 0.0f);
169 glm::vec2 mTitleBarUVScale = glm::vec2(1.0f, 1.0f);
170 glm::vec2 mTitleBarUVOffset = glm::vec2(0.0f, 0.0f);
174 glm::vec4 mCloseButtonNormalColor = glm::vec4(0.6f, 0.2f, 0.2f, 1.0f);
175 glm::vec4 mCloseButtonHoveredColor = glm::vec4(0.8f, 0.3f, 0.3f, 1.0f);
176 glm::vec4 mCloseButtonPressedColor = glm::vec4(0.5f, 0.15f, 0.15f, 1.0f);
179 bool mDragging =
false;
180 bool mResizing =
false;
181 glm::vec2 mDragOffset = glm::vec2(0.0f);
182 glm::vec2 mResizeStartSize = glm::vec2(0.0f);
183 glm::vec2 mResizeStartMouse = glm::vec2(0.0f);