feature/imgui-sdl
Last change
on this file since 87cfede was 301c90a, checked in by Dmitry Portnoy <dportnoy@…>, 4 years ago |
Implement the start of a generic UI system built on top of IMGUI, which can reposition elements when the screen is resized, and use it in VulkanGame
|
-
Property mode
set to
100644
|
File size:
331 bytes
|
Line | |
---|
1 | #ifndef _WIDGET_H
|
---|
2 | #define _WIDGET_H
|
---|
3 |
|
---|
4 | #include <glm/glm.hpp>
|
---|
5 |
|
---|
6 | using namespace glm;
|
---|
7 |
|
---|
8 | class UIWidget {
|
---|
9 | public:
|
---|
10 | virtual ~UIWidget();
|
---|
11 |
|
---|
12 | int getWidth();
|
---|
13 | int getHeight();
|
---|
14 |
|
---|
15 | virtual bool draw(int offset) = 0;
|
---|
16 |
|
---|
17 | protected:
|
---|
18 | virtual void calculateSize() = 0;
|
---|
19 |
|
---|
20 | int width, height;
|
---|
21 | };
|
---|
22 |
|
---|
23 | #endif // _WIDGET_H
|
---|
Note:
See
TracBrowser
for help on using the repository browser.