From 0d432961a29d509cd0d1fa80361f04009dcf9c17 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 19 Mar 2025 03:19:38 +0000 Subject: Remove lots of stuff not required or superseded with ImGui use --- ui/uiComponent.cpp | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 ui/uiComponent.cpp (limited to 'ui/uiComponent.cpp') 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 - -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; -} -- cgit v1.2.3