SUNENGINE 0.0.2
A simple and bright C++ game engine.
 
Loading...
Searching...
No Matches
UIAttorney::GameLoop Class Reference

Attorney for game loop access to UIComponent methods. More...

#include <UIAttorney.h>

Static Private Member Functions

static void Render (UIComponent *p)
 Calls the Render method of the UIComponent object.
 
static bool IsMouseOver (UIComponent *p, float xPos, float yPos)
 Checks if the mouse is over the UIComponent object.
 
static void OnPress (UIComponent *p)
 Calls the OnPress method of the UIComponent object.
 
static UIComponentType GetType (UIComponent *p)
 Calls the OnRelease method of the UIComponent object.
 
static void OnButtonHover (UIComponent *p)
 Calls the OnPress method of the Button object.
 
static void OnButtonHold (UIComponent *p)
 Calls the OnHold method of the Button object.
 
static void OnButtonRelease (UIComponent *p)
 Calls the OnRelease method of the Button object.
 
static bool IsEnabled (UIComponent *p)
 Checks if the UIComponent is enabled.
 
static void OnComponentLayerChanged (UIComponent *p, int oldLayer, int newLayer)
 Sets the enabled state of the UIComponent.
 

Friends

class UIComponent
 
class Canvas
 
class Dropdown
 
class ScrollList
 

Detailed Description

Attorney for game loop access to UIComponent methods.

The GameLoop class provides static methods to allow Canvas, Dropdown, and ScrollList to invoke protected or private methods of UIComponent and Button, such as rendering, input event handling, and type queries.

Only classes declared as friends (Canvas, Dropdown, ScrollList) can use these methods.

Member Function Documentation

◆ GetType()

static UIComponentType UIAttorney::GameLoop::GetType ( UIComponent * p)
inlinestaticprivate

Calls the OnRelease method of the UIComponent object.

Parameters
pPointer to the UIComponent object.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsEnabled()

static bool UIAttorney::GameLoop::IsEnabled ( UIComponent * p)
inlinestaticprivate

Checks if the UIComponent is enabled.

Returns
True if enabled, false otherwise.
Here is the call graph for this function:

◆ IsMouseOver()

static bool UIAttorney::GameLoop::IsMouseOver ( UIComponent * p,
float xPos,
float yPos )
inlinestaticprivate

Checks if the mouse is over the UIComponent object.

Parameters
pPointer to the UIComponent object.
xPosX position of the mouse.
yPosY position of the mouse.
Returns
True if the mouse is over the UIComponent, false otherwise.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnButtonHold()

static void UIAttorney::GameLoop::OnButtonHold ( UIComponent * p)
inlinestaticprivate

Calls the OnHold method of the Button object.

Parameters
pPointer to the Button object.
Here is the caller graph for this function:

◆ OnButtonHover()

static void UIAttorney::GameLoop::OnButtonHover ( UIComponent * p)
inlinestaticprivate

Calls the OnPress method of the Button object.

Parameters
pPointer to the Button object.
Here is the caller graph for this function:

◆ OnButtonRelease()

static void UIAttorney::GameLoop::OnButtonRelease ( UIComponent * p)
inlinestaticprivate

Calls the OnRelease method of the Button object.

Parameters
pPointer to the Button object.
Here is the caller graph for this function:

◆ OnComponentLayerChanged()

static void UIAttorney::GameLoop::OnComponentLayerChanged ( UIComponent * p,
int oldLayer,
int newLayer )
inlinestaticprivate

Sets the enabled state of the UIComponent.

Parameters
pPointer to the UIComponent object.
enabledTrue to enable, false to disable.
Here is the caller graph for this function:

◆ OnPress()

static void UIAttorney::GameLoop::OnPress ( UIComponent * p)
inlinestaticprivate

Calls the OnPress method of the UIComponent object.

Parameters
pPointer to the UIComponent object.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Render()

static void UIAttorney::GameLoop::Render ( UIComponent * p)
inlinestaticprivate

Calls the Render method of the UIComponent object.

Parameters
pPointer to the UIComponent object.
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: