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

Manages logging messages to the screen. More...

#include <ScreenLog.h>

Static Public Member Functions

static void SetFont (SpriteFont *font)
 Sets the font for the screen log.
 
static void SetAnchor (int x, int y)
 Sets the anchor position for the screen log.
 
static void AddLog (char *A,...)
 Adds a log message to the screen log.
 

Private Member Functions

 ScreenLog (const ScreenLog &)=delete
 
ScreenLogoperator= (const ScreenLog &)=delete
 
void privSetFont (SpriteFont *font)
 
void privSetAnchor (int x, int y)
 

Static Private Member Functions

static ScreenLogInstance ()
 
static void RenderLog ()
 Renders the log messages on the screen.
 
static void Delete ()
 Deletes the singleton instance of the ScreenLog.
 

Private Attributes

ScreenLogCommandPoolCommandPool
 Pool of available ScreenLogCommand objects.
 
std::queue< ScreenLogCommand * > ActiveCommands
 Queue of active ScreenLogCommand objects.
 
SpriteFontpFont
 Pointer to the SpriteFont used for rendering log messages.
 
int anchorX
 The x-coordinate of the anchor position.
 
int anchorY
 The y-coordinate of the anchor position.
 

Static Private Attributes

static ScreenLogptrInstance = nullptr
 
static char DebugBuff [256]
 Buffer for formatting debug messages.
 

Friends

class ScreenLogAttorney
 

Detailed Description

Manages logging messages to the screen.

The ScreenLog class is responsible for managing and rendering log messages on the screen. It allows setting a font, anchor position, and adding log messages.

Member Function Documentation

◆ AddLog()

void ScreenLog::AddLog ( char * A,
... )
static

Adds a log message to the screen log.

Parameters
AThe format string for the log message.
...Additional arguments for the format string.

◆ SetAnchor()

static void ScreenLog::SetAnchor ( int x,
int y )
inlinestatic

Sets the anchor position for the screen log.

Parameters
xThe x-coordinate of the anchor.
yThe y-coordinate of the anchor.

◆ SetFont()

static void ScreenLog::SetFont ( SpriteFont * font)
inlinestatic

Sets the font for the screen log.

Parameters
fontPointer to the SpriteFont to be used.

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