feature/imgui-sdl
|
Last change
on this file since db2d995 was 301c90a, checked in by Dmitry Portnoy <dportnoy@…>, 5 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:
409 bytes
|
| Line | |
|---|
| 1 | #ifndef _BUTTON_IMGUI_H
|
|---|
| 2 | #define _BUTTON_IMGUI_H
|
|---|
| 3 |
|
|---|
| 4 | #include <string>
|
|---|
| 5 |
|
|---|
| 6 | #include <glm/glm.hpp>
|
|---|
| 7 |
|
|---|
| 8 | #include "ui-widget.hpp"
|
|---|
| 9 |
|
|---|
| 10 | using namespace glm;
|
|---|
| 11 | using namespace std;
|
|---|
| 12 |
|
|---|
| 13 | class ButtonImGui : public UIWidget {
|
|---|
| 14 | public:
|
|---|
| 15 | ButtonImGui(string label);
|
|---|
| 16 | virtual ~ButtonImGui();
|
|---|
| 17 |
|
|---|
| 18 | bool draw(int offset);
|
|---|
| 19 |
|
|---|
| 20 | protected:
|
|---|
| 21 | void calculateSize();
|
|---|
| 22 |
|
|---|
| 23 | private:
|
|---|
| 24 | string label;
|
|---|
| 25 | };
|
|---|
| 26 |
|
|---|
| 27 | #endif // _BUTTON_IMGUI_H
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.