Surface.ScreenScaleWidth
Skip to content
mnscript
number Surface.ScreenScaleWidth(number) 

Description ​

Returns a number from 0 - Screen Width.

Arguments ​

number

Returns ​

number - A number from 0 - Screen Width interpolated using the input.

Example ​

msc
using Surface;

// These values will be returned for the monitor which the application is currently on.
// This means if the application is not open, or opens on a different monitor with a different size,
// the values will no longer be accurate.
// See event 'Surface_ApplicationScreenChanged' to reload your UI when the application is shown on a new screen.

number screenWidth = Surface.ScreenScaleWidth(1);
number halfScreenWidth = Surface.ScreenScaleWidth(0.5);