[RPG/JS] Screen dimensions
[RPG/JS] Screen dimensions
Is it possible to get the device screen dimensions from within a script? Maybe using the q_getSystemValue function?
-
tsupartono
- Posts: 289
- Joined: Wed Apr 18, 2012 10:21 am
Re: [RPG/JS] Screen dimensions
Below is an example of getting the screen width & height (in the current device orientation), and outputs the result to the console.
Code: Select all
lrexec(
function()
{
this.q_getSystemValue("DEVICE-SCREEN-SIZE-WIDTH");
},
function(value)
{
this.console("screen-width = " + value);
this.q_getSystemValue("DEVICE-SCREEN-SIZE-HEIGHT");
},
function(value)
{
this.console("screen-height = " + value);
},
}