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