safeZoneW: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (template:command argument fix)
(14 intermediate revisions by 10 users not shown)
Line 7: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


| |= Description
| [[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=
 
____________________________________________________________________________________________
____________________________________________________________________________________________


| '''SafeZoneW''' |= Syntax
| '''safeZoneW''' |SYNTAX=


|p1= |= PARAMETER1
|p1= |PARAMETER1=  


|p2= |= PARAMETER2
|p2= |PARAMETER2=  


|p3= |= PARAMETER3
|p3= |PARAMETER3=  


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




|x1= <code>(example)</code>|= EXAMPLE1  
|x1= <code>_screenWidth = [[safeZoneW]];</code> |EXAMPLE1=
|x2=  <code>_screenRightBorderX = [[safeZoneW]] + [[safeZoneX]];</code> |EXAMPLE1=2


____________________________________________________________________________________________
____________________________________________________________________________________________


| [[SafeZone]], [[SafeZoneX]], [[SafeZoneY]], [[SafeZoneH]] |= SEEALSO
| [[SafeZone]], [[safeZoneX]], [[safeZoneY]], [[safeZoneH]], [[safeZoneXAbs]], [[safeZoneWAbs]] |SEEALSO=  


|  |= MPBEHAVIOUR
|  |MPBEHAVIOUR=  
____________________________________________________________________________________________
____________________________________________________________________________________________
}}
}}
Line 41: Line 46:
[[Category:ArmA 2: New Scripting Commands List|{{uc:{{PAGENAME}}}}]]
[[Category:ArmA 2: New Scripting Commands List|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category: Dialogs]]
[[Category:Command_Group:_GUI_Control|{{uc:{{PAGENAME}}}}]]

Revision as of 15:46, 7 April 2019

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:
Uncategorised

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

Notes

Bottom Section