- Timestamp:
- Feb 13, 2021, 11:41:39 PM (4 years ago)
- Branches:
- feature/imgui-sdl
- Children:
- c6f0793
- Parents:
- 8b823e7
- Location:
- gui
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
gui/button.cpp
r8b823e7 rd8cf709 87 87 } 88 88 89 void Button::handleEvent( UIEvent& e) {89 void Button::handleEvent(GameEvent& e) { 90 90 switch(e.type) { 91 91 case UI_EVENT_MOUSEMOTION: -
gui/button.hpp
r8b823e7 rd8cf709 21 21 void init() override; 22 22 void render(int x, int y) override; 23 void handleEvent( UIEvent& e) override;23 void handleEvent(GameEvent& e) override; 24 24 25 25 private: -
gui/game-screen.cpp
r8b823e7 rd8cf709 49 49 } 50 50 51 void GameScreen::handleEvent( UIEvent& e) {51 void GameScreen::handleEvent(GameEvent& e) { 52 52 Screen::handleEvent(e); 53 53 } -
gui/game-screen.hpp
r8b823e7 rd8cf709 13 13 void createRenderCommands(VkCommandBuffer& commandBuffer, uint32_t currentImage) override; 14 14 15 void handleEvent( UIEvent& e) override;15 void handleEvent(GameEvent& e) override; 16 16 }; 17 17 -
gui/main-screen.cpp
r8b823e7 rd8cf709 21 21 } 22 22 23 void MainScreen::handleEvent( UIEvent& e) {23 void MainScreen::handleEvent(GameEvent& e) { 24 24 Screen::handleEvent(e); 25 25 } -
gui/main-screen.hpp
r8b823e7 rd8cf709 13 13 void createRenderCommands(VkCommandBuffer& commandBuffer, uint32_t currentImage) override; 14 14 15 void handleEvent( UIEvent& e) override;15 void handleEvent(GameEvent& e) override; 16 16 }; 17 17 -
gui/panel.cpp
r8b823e7 rd8cf709 72 72 } 73 73 74 void Panel::handleEvent( UIEvent& e) {74 void Panel::handleEvent(GameEvent& e) { 75 75 for (UIElement*& uiElement : this->uiElements) { 76 76 uiElement->handleEvent(e); -
gui/panel.hpp
r8b823e7 rd8cf709 19 19 20 20 void render(int x, int y) override; 21 void handleEvent( UIEvent& e) override;21 void handleEvent(GameEvent& e) override; 22 22 23 23 private: -
gui/screen.cpp
r8b823e7 rd8cf709 29 29 } 30 30 31 void Screen::handleEvent( UIEvent& e) {31 void Screen::handleEvent(GameEvent& e) { 32 32 for (UIElement*& uiElement : this->uiElements) { 33 33 uiElement->handleEvent(e); -
gui/screen.hpp
r8b823e7 rd8cf709 17 17 class VulkanGame; 18 18 19 template<class Type>20 struct ValueReference {21 22 };23 24 19 // TODO: Add a function to create an SDL_Color from a uint32_t 25 20 … … 34 29 35 30 virtual void renderUI(); 36 virtual void handleEvent( UIEvent& e);31 virtual void handleEvent(GameEvent& e); 37 32 void addUIElement(UIElement* element); 38 33 -
gui/ui-element.cpp
r8b823e7 rd8cf709 21 21 } 22 22 23 void UIElement::handleEvent( UIEvent& e) {23 void UIElement::handleEvent(GameEvent& e) { 24 24 } -
gui/ui-element.hpp
r8b823e7 rd8cf709 18 18 virtual void init(); 19 19 virtual void render(int x, int y) = 0; 20 virtual void handleEvent( UIEvent& e);20 virtual void handleEvent(GameEvent& e); 21 21 22 22 protected:
Note:
See TracChangeset
for help on using the changeset viewer.