diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2025-03-19 03:19:38 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2025-03-19 03:19:38 +0000 |
commit | 0d432961a29d509cd0d1fa80361f04009dcf9c17 (patch) | |
tree | bc7536b0ac454a3c466c904123b41498dc6b1905 /ui/uiComponent.cpp | |
parent | Replace basic query tool with a ImGui version (diff) | |
download | ilt-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.cpp')
-rw-r--r-- | ui/uiComponent.cpp | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/ui/uiComponent.cpp b/ui/uiComponent.cpp deleted file mode 100644 index aa4838d..0000000 --- a/ui/uiComponent.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include "uiComponent.h" -#include <SDL2/SDL.h> - -UIComponent::UIComponent(Position position) : position {position} { } - -UIComponent::Position -UIComponent::Position::operator+(const Position & parentPos) const -{ - return *this + parentPos.origin; -} - -UIComponent::Position -UIComponent::Position::operator+(const glm::vec2 & parentPos) const -{ - return {origin + parentPos, size}; -} - -bool -UIComponent::Position::operator&(const glm::vec2 & pos) const -{ - return (pos.x >= origin.x && pos.y >= origin.y && pos.x < origin.x + size.x && pos.y < origin.y + size.y); -} - -bool -UIComponent::Position::operator&(const SDL_MouseButtonEvent & pos) const -{ - switch (pos.type) { - case SDL_MOUSEBUTTONUP: - case SDL_MOUSEBUTTONDOWN: - return *this & glm::vec2 {pos.x, pos.y}; - } - return false; -} |