Log classes: - LAGx/simpllight GitHub Wiki

class Log

  • using for loging in file logName (log.txt).

static void clear();

  • clear log file

static void log(string log, bool time = false);

  • calling for writing some "log" in file
  • parameter "time"-true write timing of log

static void error(string err, bool time = false);

  • doing the same like log(), but write ERROR:

class ScreenLog

  • for dynamic screen logging For using this class you must init an object of this class and use

void setNewLog(string name,int id, int pos = 0);

where "name" - name of this log, "id" - id for getting access, "pos" - nunber of line.

Then, it needs to use

void blit();

before function void "spl::Window::drawAll()".

So, now you can use

static void setValue(int id, string value = "None");

where "id"-id of log,"value" - text, which have to update/change

in any part of program, which perform in main loop of game.

  • if log wasn't update by set value, it's blit last value