Slippers Engine
 
Loading...
Searching...
No Matches
ScreenLog Class Reference

Debug Tool for Logging information to the top left or panels. More...

#include <ScreenLog.h>

Collaboration diagram for ScreenLog:
Collaboration graph

Static Public Member Functions

static void Add (char *A,...)
 Adds a new line to the top left Screen Logger.
 
static PanelCreatePanel (int x, int y, Vect bkgColor=Vect(0, 0, 0, 0), Vect borderColor=Vect(0, 0, 0, 0))
 Creates a panel for extra screen logging tools.
 
static void RemovePanel (Panel *p)
 Removes a panel from rendering and deletes Panel.
 

Detailed Description

Debug Tool for Logging information to the top left or panels.

Member Function Documentation

◆ Add()

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

Adds a new line to the top left Screen Logger.

You can add floats and ints like with printf Example:

ScreenLog::Add("Demo line");
ScreenLog::Add("%i", demoInt);
ScreenLog::Add("%3.1f", demoFloat);
static void Add(char *A,...)
Adds a new line to the top left Screen Logger.
Definition ScreenLog.cpp:49
Parameters
A

◆ CreatePanel()

static Panel * ScreenLog::CreatePanel ( int x,
int y,
Vect bkgColor = Vect(0,0,0,0),
Vect borderColor = Vect(0, 0, 0, 0) )
static

Creates a panel for extra screen logging tools.

Panels default to having no background or border. One can manually set the color and transparency as a Vect when creating the panel.

Example:

//Creates Blue Panel with Red Border
//Creates Transparent Panel
//Creates a semi Transparent Blue Panel
Panel* p3 = ScreenLog::CreatePanel(100, Game::GetHeight() - 350, Vect(.3f, .5f, .7f, .5f));
static int GetHeight()
Returns window's height in pixels.
Definition Game.h:161
Extra feature of ScreenLog.
Definition Panel.h:15
static Panel * CreatePanel(int x, int y, Vect bkgColor=Vect(0, 0, 0, 0), Vect borderColor=Vect(0, 0, 0, 0))
Creates a panel for extra screen logging tools.
Definition ScreenLog.h:102
static const Vect Blue
Definition ColorsCommon.h:28
static const Vect Red
Definition ColorsCommon.h:132
Parameters
x
y
bkgColor
borderColor
Returns
Panel*

◆ RemovePanel()

static void ScreenLog::RemovePanel ( Panel * p)
static

Removes a panel from rendering and deletes Panel.

Parameters
p