|
bool | isRecursive () const final |
| Check if this GuiElement is recursive.
|
|
void | setGuiScale (fge::Vector2f const &scale) |
| Set the scale of the element.
|
|
fge::Vector2f const & | getGuiScale () const |
| Get the scale of the element.
|
|
void | setPriority (fge::GuiElement::Priority priority) const |
| Set the priority of the element.
|
|
fge::GuiElement::Priority | getPriority () const |
| Get the priority of the element.
|
|
bool | verifyPriority (fge::GuiElement *element) const |
| Verify if the priority of the element is higher than the given element.
|
|
virtual void | onGuiVerify (fge::Event const &evt, SDL_EventType evtType, fge::GuiElementContext &context)=0 |
| Function called to verify if the element is hovered by the mouse.
|
|
|
static void | setGlobalGuiScale (fge::Vector2f const &scale) |
|
static fge::Vector2f const & | getGlobalGuiScale () |
|
|
fge::GuiElement::Priority | _g_priority { 50 } |
|
fge::Vector2f | _g_scale {1.0f, 1.0f} |
|
◆ getGuiScale()
fge::Vector2f const & fge::GuiElement::getGuiScale |
( |
| ) |
const |
|
inlinenodiscardinherited |
Get the scale of the element.
- Returns
- The scale of the element
◆ getPriority()
fge::GuiElement::Priority fge::GuiElement::getPriority |
( |
| ) |
const |
|
inlinenodiscardinherited |
Get the priority of the element.
- Returns
- The priority of the element
◆ isRecursive()
bool fge::GuiElementRecursive::isRecursive |
( |
| ) |
const |
|
inlinefinalvirtual |
Check if this GuiElement is recursive.
A gui element is recursive if it handle others GuiElements.
- Returns
- true if it is recursive, false otherwise
Reimplemented from fge::GuiElement.
◆ onGuiVerify()
Function called to verify if the element is hovered by the mouse.
This function should call verifyPriority to verify the priority of the element. If the priority is higher than the given element, the function should replace the provided pointer reference element with the element itself.
- Parameters
-
Implemented in fge::GuiElementArray, fge::GuiElementDefault, and fge::GuiElementRectangle.
◆ setGuiScale()
void fge::GuiElement::setGuiScale |
( |
fge::Vector2f const & | scale | ) |
|
|
inlineinherited |
Set the scale of the element.
- Parameters
-
scale | The scale of the element |
◆ setPriority()
void fge::GuiElement::setPriority |
( |
fge::GuiElement::Priority | priority | ) |
const |
|
inlineinherited |
Set the priority of the element.
The priority value can be used with the scene DepthPlan.
- Parameters
-
priority | The priority of the element |
◆ verifyPriority()
Verify if the priority of the element is higher than the given element.
If the provided element is null, the function will assume that the element is the highest priority.
- Parameters
-
element | The element to compare with |
- Returns
- true if the priority of the element is higher than the given element, false otherwise
◆ _onGuiMouseButtonPressed
Callback called when the element is verified and the mouse is pressed.
◆ _onGuiMouseButtonReleased
Callback called when the element is verified and a mouse button is released.
◆ _onGuiMouseMoved
Callback called when the element is verified and the mouse is moved.
◆ _onGuiMouseWheelScrolled
Callback called when the element is verified and the mouse wheel is scrolled.
The documentation for this class was generated from the following file: