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 | |
| ScreenLog & | operator= (const ScreenLog &)=delete |
| void | privSetFont (SpriteFont *font) |
| void | privSetAnchor (int x, int y) |
Static Private Member Functions | |
| static ScreenLog & | Instance () |
| static void | RenderLog () |
| Renders the log messages on the screen. | |
| static void | Delete () |
| Deletes the singleton instance of the ScreenLog. | |
Private Attributes | |
| ScreenLogCommandPool * | CommandPool |
| Pool of available ScreenLogCommand objects. | |
| std::queue< ScreenLogCommand * > | ActiveCommands |
| Queue of active ScreenLogCommand objects. | |
| SpriteFont * | pFont |
| 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 ScreenLog * | ptrInstance = nullptr |
| static char | DebugBuff [256] |
| Buffer for formatting debug messages. | |
Friends | |
| class | ScreenLogAttorney |
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.
|
static |
Adds a log message to the screen log.
| A | The format string for the log message. |
| ... | Additional arguments for the format string. |
|
inlinestatic |
Sets the anchor position for the screen log.
| x | The x-coordinate of the anchor. |
| y | The y-coordinate of the anchor. |
|
inlinestatic |
Sets the font for the screen log.
| font | Pointer to the SpriteFont to be used. |