Potato Engine
Loading...
Searching...
No Matches
UIElement.cpp
Go to the documentation of this file.
1
2
3#include "UIElement.hpp"
4
6 return ScreenSize;
7}
9 ScreenSize = size;
10}
11
12
14 return ScreenPosition;
15}
16void UIElement::SetScreenPosition(const Vector2 &ScreenPos) {
17 ScreenPosition = ScreenPos;
18}
19
20void UIElement::AddScreenOffset(const Vector2& ScreenOffset) {
21 SetScreenPosition(ScreenPosition + ScreenOffset);
22}
23
24
26 return Visible;
27}
28void UIElement::SetVisibility(bool visibility) {
29 Visible = visibility;
30}
31
void AddScreenOffset(const Vector2 &offset)
Adds offset to UI position.
Definition UIElement.cpp:20
void SetScreenSize(const Vector2 &size)
Sets size of UI.
Definition UIElement.cpp:8
Vector2 GetScreenPosition() const
Gets screen position of UI.
Definition UIElement.cpp:13
Vector2 GetScreenSize() const
Gets size of UI.
Definition UIElement.cpp:5
void SetScreenPosition(const Vector2 &ScreenPosition)
Sets screen position of UI.
Definition UIElement.cpp:16
void SetVisibility(bool visibility)
Sets visibility of UI.
Definition UIElement.cpp:28
bool isVisible() const
Checks if UI is visible.
Definition UIElement.cpp:25
Standard 2-dimensional vector.
Definition Vector2.hpp:11