feature/imgui-sdl
Last change
on this file since 670c09a was e1f88a9, checked in by Dmitry Portnoy <dmitry.portnoy@…>, 4 years ago |
Create a system to draw and switch between different screens, a Screen class, a MainScreen class that extends it, and some classes for UI elements that can be added to screens.
|
-
Property mode
set to
100644
|
File size:
556 bytes
|
Line | |
---|
1 | #include "ui-element.hpp"
|
---|
2 |
|
---|
3 | UIElement::UIElement(int x, int y, int width, int height, SDL_Renderer& renderer,
|
---|
4 | void (*onMouseClick)(VulkanGame& gameInfo),
|
---|
5 | void (*onMouseEnter)(UIElement& element),
|
---|
6 | void (*onMouseLeave)(UIElement& element)) :
|
---|
7 | x(x),
|
---|
8 | y(y),
|
---|
9 | width(width),
|
---|
10 | height(height),
|
---|
11 | renderer(renderer),
|
---|
12 | onMouseClick(onMouseClick),
|
---|
13 | onMouseEnter(onMouseEnter),
|
---|
14 | onMouseLeave(onMouseLeave) {
|
---|
15 | }
|
---|
16 |
|
---|
17 | UIElement::~UIElement() {
|
---|
18 | }
|
---|
19 |
|
---|
20 | void UIElement::init() {
|
---|
21 | }
|
---|
22 |
|
---|
23 | void UIElement::handleEvent(UIEvent& e) {
|
---|
24 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.