Potato Engine
Loading...
Searching...
No Matches
IHUDController Class Referenceabstract

Manages global HUD. More...

#include <HUDController.hpp>

Public Member Functions

virtual void RemoveWidget (std::string UID)=0
 Remove a Widget from the screen.
template<typename WidgetClass>
WidgetClass * AddWidget (std::string UID)
 Construct and add widget to the screen.
virtual WidgetGetWidget (std::string UID) const =0
 Gets widget by UID.

Protected Member Functions

virtual void RegisterWidget (Widget *widget)=0

Detailed Description

Manages global HUD.

Definition at line 10 of file HUDController.hpp.

Member Function Documentation

◆ RemoveWidget()

virtual void IHUDController::RemoveWidget ( std::string UID)
pure virtual

Remove a Widget from the screen.

Parameters
UIDUID of the widget to remove
Note
This function deletes the widget instance and render buffer. Do not use this to hide the widget temporarily, or when preservation of data is vital.
See also
Widget::SetVisibility

◆ AddWidget()

template<typename WidgetClass>
WidgetClass * IHUDController::AddWidget ( std::string UID)

Construct and add widget to the screen.

  • Template Parameters
    WidgetClassSpecific class of widget to add
    Parameters
    UIDUnique ID to identify widget
    Returns
    Widget that was added

Definition at line 40 of file HUDController.hpp.

◆ GetWidget()

virtual Widget * IHUDController::GetWidget ( std::string UID) const
pure virtual

Gets widget by UID.

Parameters
UIDUID
Returns
Widget matching name