|
Potato Engine
|
Wrapper for elements that can be rendered on screen. More...
#include <UIElement.hpp>
Public Member Functions | |
| Vector2 | GetScreenSize () const |
| Gets size of UI. | |
| void | SetScreenSize (const Vector2 &size) |
| Sets size of UI. | |
| Vector2 | GetScreenPosition () const |
| Gets screen position of UI. | |
| void | SetScreenPosition (const Vector2 &ScreenPosition) |
| Sets screen position of UI. | |
| void | AddScreenOffset (const Vector2 &offset) |
| Adds offset to UI position. | |
| bool | isVisible () const |
| Checks if UI is visible. | |
| void | SetVisibility (bool visibility) |
| Sets visibility of UI. | |
Wrapper for elements that can be rendered on screen.
Used for scaling size, position, offsets, and visibility parameters across different types of UI targets
Definition at line 11 of file UIElement.hpp.
| Vector2 UIElement::GetScreenSize | ( | ) | const |
Gets size of UI.
Definition at line 5 of file UIElement.cpp.
| void UIElement::SetScreenSize | ( | const Vector2 & | size | ) |
Sets size of UI.
| size | Vector with x and y size components |
Definition at line 8 of file UIElement.cpp.
| Vector2 UIElement::GetScreenPosition | ( | ) | const |
Gets screen position of UI.
Definition at line 13 of file UIElement.cpp.
| void UIElement::SetScreenPosition | ( | const Vector2 & | ScreenPosition | ) |
Sets screen position of UI.
| ScreenPosition | vector with x and y screen positions |
Definition at line 16 of file UIElement.cpp.
| void UIElement::AddScreenOffset | ( | const Vector2 & | offset | ) |
Adds offset to UI position.
| offset | Vector with offset direction |
Definition at line 20 of file UIElement.cpp.
| bool UIElement::isVisible | ( | ) | const |
| void UIElement::SetVisibility | ( | bool | visibility | ) |
Sets visibility of UI.
| visibility | Visibility to set |
Definition at line 28 of file UIElement.cpp.