safeZoneW: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<h3 style='display:none'>Notes</h3> <dl class='command_description'> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl> <h3 style='display:none'>Bottom Section</h3>" to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame( +[0-9])?|Game [Vv]ersion( +[0-9])?|Game Version \(number surrounded by NO SPACES\)|Arguments in MP|MP[Aa]rg|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects...)
Line 1: Line 1:
{{Command|Comments=
{{Command


| arma2 |Game name=
| arma2


|1.00|Game version=
|1.00


|gr1= GUI Control |GROUP1=
|gr1= GUI Control


| [[Image:safezone.jpg|600px]]<br><br>
| [[Image:safezone.jpg|600px]]<br><br>


Returns the width of the screen in screen measurement units. Taken from top left corner of the default viewport (0,0) of the screen and going in the same direction as the X axis, the value will be positive but resulting X will end up beyond the right border. Therefore in order to calculate X of the right screen border, the length of [[safeZoneX]] must be subtracted from [[safeZoneW]], but because it is negative, it must be added instead. <tt>_screenRightBorderX <nowiki>=</nowiki> [[safeZoneW]] + [[safeZoneX]]</tt>. The measurement units depend on the current screen resolution [[getResolution]]. See also [[SafeZone]] |DESCRIPTION=
Returns the width of the screen in screen measurement units. Taken from top left corner of the default viewport (0,0) of the screen and going in the same direction as the X axis, the value will be positive but resulting X will end up beyond the right border. Therefore in order to calculate X of the right screen border, the length of [[safeZoneX]] must be subtracted from [[safeZoneW]], but because it is negative, it must be added instead. <tt>_screenRightBorderX <nowiki>=</nowiki> [[safeZoneW]] + [[safeZoneX]]</tt>. The measurement units depend on the current screen resolution [[getResolution]]. See also [[SafeZone]]


| '''safeZoneW''' |SYNTAX=
| '''safeZoneW'''


| [[Number]] |RETURNVALUE=
| [[Number]]


|x1=  <code>_screenWidth = [[safeZoneW]];</code> |EXAMPLE1=
|x1=  <code>_screenWidth = [[safeZoneW]];</code>


|x2=  <code>_screenRightBorderX = [[safeZoneW]] + [[safeZoneX]];</code> |EXAMPLE2=
|x2=  <code>_screenRightBorderX = [[safeZoneW]] + [[safeZoneX]];</code>


| [[SafeZone]], [[safeZoneX]], [[safeZoneY]], [[safeZoneH]], [[safeZoneXAbs]], [[safeZoneWAbs]] |SEEALSO=
| [[SafeZone]], [[safeZoneX]], [[safeZoneY]], [[safeZoneH]], [[safeZoneXAbs]], [[safeZoneWAbs]]
}}
}}



Revision as of 12:02, 18 January 2021

Hover & click on the images for description

Description

Description:
safezone.jpg

Returns the width of the screen in screen measurement units. Taken from top left corner of the default viewport (0,0) of the screen and going in the same direction as the X axis, the value will be positive but resulting X will end up beyond the right border. Therefore in order to calculate X of the right screen border, the length of safeZoneX must be subtracted from safeZoneW, but because it is negative, it must be added instead. _screenRightBorderX = safeZoneW + safeZoneX. The measurement units depend on the current screen resolution getResolution. See also SafeZone
Groups:
GUI Control

Syntax

Syntax:
safeZoneW
Return Value:
Number

Examples

Example 1:
_screenWidth = safeZoneW;
Example 2:
_screenRightBorderX = safeZoneW + safeZoneX;

Additional Information

See also:
SafeZonesafeZoneXsafeZoneYsafeZoneHsafeZoneXAbssafeZoneWAbs

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note