OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Private Attributes | List of all members
OverlaySystem Class Reference

An Overlay is a screen built in Immediate Mode GUI ( imgui ) which is displayed on top of any other ui and it's mainly used for debug purposes ( Console, Render Stats, Debug View Buttons, etc... ). More...

#include <OverlaySystem.h>

Public Member Functions

 OverlaySystem (Renderer &render, PlatformApplication &platformApplication)
 
 ~OverlaySystem ()
 
void addOverlay (std::string_view name, std::unique_ptr< Overlay > overlay)
 
void removeOverlay (std::string_view name)
 
bool isEnabled () const
 
void setEnabled (bool enable)
 
void drawOverlays ()
 

Static Public Attributes

static LogCategory OverlayLogCategory
 

Private Attributes

std::unordered_map< TransparentString, std::unique_ptr< Overlay >, TransparentStringHash, TransparentStringEquals_overlays
 
Renderer_renderer
 
PlatformApplication_application
 
std::function< void()> _unregisterDependencies
 
bool _isEnabled {}
 

Detailed Description

An Overlay is a screen built in Immediate Mode GUI ( imgui ) which is displayed on top of any other ui and it's mainly used for debug purposes ( Console, Render Stats, Debug View Buttons, etc... ).

The Overlay System is the class responsible to keep track of all the registered Overlays and update them accordingly.

Constructor & Destructor Documentation

◆ OverlaySystem()

OverlaySystem::OverlaySystem ( Renderer render,
PlatformApplication platformApplication 
)

◆ ~OverlaySystem()

OverlaySystem::~OverlaySystem ( )

Member Function Documentation

◆ addOverlay()

void OverlaySystem::addOverlay ( std::string_view  name,
std::unique_ptr< Overlay overlay 
)

◆ drawOverlays()

void OverlaySystem::drawOverlays ( )

◆ isEnabled()

bool OverlaySystem::isEnabled ( ) const

◆ removeOverlay()

void OverlaySystem::removeOverlay ( std::string_view  name)

◆ setEnabled()

void OverlaySystem::setEnabled ( bool  enable)

Member Data Documentation

◆ _application

PlatformApplication& OverlaySystem::_application
private

◆ _isEnabled

bool OverlaySystem::_isEnabled {}
private

◆ _overlays

std::unordered_map<TransparentString, std::unique_ptr<Overlay>, TransparentStringHash, TransparentStringEquals> OverlaySystem::_overlays
private

◆ _renderer

Renderer& OverlaySystem::_renderer
private

◆ _unregisterDependencies

std::function<void()> OverlaySystem::_unregisterDependencies
private

◆ OverlayLogCategory

LogCategory OverlaySystem::OverlayLogCategory
static

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