summaryrefslogtreecommitdiff
path: root/ui/uiComponent.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2025-03-19 03:19:38 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2025-03-19 03:19:38 +0000
commit0d432961a29d509cd0d1fa80361f04009dcf9c17 (patch)
treebc7536b0ac454a3c466c904123b41498dc6b1905 /ui/uiComponent.h
parentReplace basic query tool with a ImGui version (diff)
downloadilt-0d432961a29d509cd0d1fa80361f04009dcf9c17.tar.bz2
ilt-0d432961a29d509cd0d1fa80361f04009dcf9c17.tar.xz
ilt-0d432961a29d509cd0d1fa80361f04009dcf9c17.zip
Remove lots of stuff not required or superseded with ImGui use
Diffstat (limited to 'ui/uiComponent.h')
-rw-r--r--ui/uiComponent.h19
1 files changed, 3 insertions, 16 deletions
diff --git a/ui/uiComponent.h b/ui/uiComponent.h
index 71d2659..9178c6b 100644
--- a/ui/uiComponent.h
+++ b/ui/uiComponent.h
@@ -1,32 +1,19 @@
#pragma once
-#include <functional>
#include <glm/glm.hpp>
#include <special_members.h>
class UIShader;
union SDL_Event;
-struct SDL_MouseButtonEvent;
-using UIEvent = std::function<void(const SDL_Event &)>;
class UIComponent {
public:
- struct Position {
- glm::vec2 origin, size;
- Position operator+(const Position &) const;
- Position operator+(const glm::vec2 &) const;
- bool operator&(const SDL_MouseButtonEvent &) const;
- bool operator&(const glm::vec2 &) const;
- };
-
- explicit UIComponent(Position);
+ UIComponent() = default;
virtual ~UIComponent() = default;
NO_MOVE(UIComponent);
NO_COPY(UIComponent);
- virtual void render(const UIShader &, const Position & parentPos) const = 0;
- virtual bool handleInput(const SDL_Event &, const Position & parentPos) = 0;
-
- Position position;
+ virtual void render(const UIShader &) const = 0;
+ virtual bool handleInput(const SDL_Event &) = 0;
};