VSGL2 - Very Simple Graphic Library 2  2.0
 All Classes Namespaces Files Functions Variables Macros Pages
Functions
vsgl2::utils Namespace Reference

Functions

void wait_for_button_pressed ()
 Use this function to wait for any button to be pressed. More...
 
void delay (int milliseconds)
 Use this function to stop the execution for a given amount of milliseconds. More...
 
unsigned int ms_time ()
 Use this function to get the time from SDL initialization in milliseconds. More...
 
int take_screenshot (string filename)
 Use this function to take a screenshot of the window. More...
 

Function Documentation

void delay ( int  milliseconds)

Use this function to stop the execution for a given amount of milliseconds.

Parameters
millisecondsAmount of time the program is stopped, in milliseconds
unsigned int ms_time ( )

Use this function to get the time from SDL initialization in milliseconds.

Returns
Amount of time from SDL initialization in milliseconds
Warning
This value wraps if the program runs for more than ~49 days
int take_screenshot ( string  filename)

Use this function to take a screenshot of the window.

Parameters
filenameThe filename where the screenshot will be saved
Returns
0 on success, negative otherwise
Note
The image is saved in BMP format
void wait_for_button_pressed ( )

Use this function to wait for any button to be pressed.

Warning
This freezes the program while waiting for the button to be pressed so that no drawing or updating can occur at the same time