Definition
int GetScreenResolution()
Description
When running the game, you can select the resolution from the dialog that appears at the beginning of the game. This function returns the width of the selected resolution in pixels.
Return Value
If the current resolution of the monitor is selected, it returns 0, otherwise it returns the width of the selected resolution.
Example
resolution = 0 function Init() resolution = GetScreenResolution() message = string.format("\nScreen resolution is > %d" , resolution) PrintConsole(message) end function Update() endGetScreenResolution