source: opengl-game/gui/ui-element.cpp@ 9d21aac

feature/imgui-sdl
Last change on this file since 9d21aac was d8cf709, checked in by Dmitry Portnoy <dportnoy@…>, 4 years ago

Change UIEvent to also include the original event from the UI library the game gui is currently using, such as SDL or GLFW.

  • Property mode set to 100644
File size: 558 bytes
Line 
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(GameEvent& e) {
24}
Note: See TracBrowser for help on using the repository browser.