CodeBase - Log to file and scrollable area
Uploaded: 10th Oct 2011 14:39
Modified: 1st Jan 1970 01:00
This routine allows you to log to a scrollable area on your game and/or file, depends on few module sets
This module creates a scrollable area allowing you to display up to 10 lines at the time. The old message will be gone when a new one is added.<br /> <br /> The attachment contains the font used to make it, but you can customize the way you want.<br /> <br /> Any place on your code, you can call <br /> <br /> Log(String) where the string can be anything, like contant messages and variables. Non-strings variables must be converted using Str. Ex:<br /> <br /> Log("Coord X = " + str(x))<br /> <br /> Another important thing is calling ShowLogs() from inside the function that renders the screen. This will actually show the message on the screen.<br /> <br /> If you notice, there are a LOG_FILE variable at the beginning of the module. Setting it to 1 will make the module to create a log file in the application working folder. Set to zero will make the messages be displayed on screen only.<br /> <br /> <br /> <br />
No comments yet.