source: opengl-game/gui/ui-element.cpp@ 6493e43

feature/imgui-sdl
Last change on this file since 6493e43 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
RevLine 
[e1f88a9]1#include "ui-element.hpp"
2
3UIElement::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
17UIElement::~UIElement() {
18}
19
20void UIElement::init() {
21}
22
23void UIElement::handleEvent(UIEvent& e) {
24}
Note: See TracBrowser for help on using the repository browser.