getResolution: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) (example) |
Lou Montana (talk | contribs) (Page refresh) |
||
Line 1: | Line 1: | ||
{{Command|= | {{Command|Comments= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| arma2oa | | | arma2oa |Game name= | ||
|1.55| | |1.55|Game version= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| Returns an array containing all information about resolution. | | Returns an array containing all information about resolution. | ||
<br> | {{Feature Arma3|'''Render resolution''' is not returned by this command.<br> | ||
A setting of '''50%''' means half of native width ''and'' half of native height, resulting in a render resolution of '''''25%''''' the original resolution.}} | |||
|Description= | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| | | [[getResolution]] |Syntax= | ||
| [[Array]] |= Return value | | [[Array]] - to format [width, height, uiViewPortWidth, uiViewPortHeight, aspectRatio, uiScale] | ||
{{Informative|aspect ratio is returned as a coefficient: | |||
* 16/9 {{=}} 1.777777(…) | |||
* 4/3 {{=}} 1.333333(…) | |||
* triple screen 16/9 {{=}} 5.333333(…)}} | |||
|Return value= | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|x1= <code>_res = [[getResolution]]; // | |x1= <code>_res = [[getResolution]]; {{codecomment|// a 16/9 single monitor setup}}</code> | ||
<code>[ | <code>[ | ||
1360, //width | 1360, {{codecomment|// width}} | ||
768, //height | 768, {{codecomment|// height}} | ||
867, //2D viewport width | 867, {{codecomment|// 2D viewport width}} | ||
653, //2D viewport height | 653, {{codecomment|// 2D viewport height}} | ||
1.77778, //aspect ratio | 1.77778, {{codecomment|// aspect ratio}} | ||
0.85 //UI scale | 0.85 {{codecomment|// UI scale}} | ||
]</code> | | ]</code> |Example 1= | ||
|x2= <code>_res = [[getResolution]]; //dedicated server</code> | |x2= <code>_res = [[getResolution]]; {{codecomment|// dedicated server}}</code> | ||
<code>[ | <code>[ | ||
160, //width | 160, {{codecomment|// width}} | ||
120, //height | 120, {{codecomment|// height}} | ||
136, //2D viewport width | 136, {{codecomment|// 2D viewport width}} | ||
102, //2D viewport height | 102, {{codecomment|// 2D viewport height}} | ||
1.33333, //aspect ratio | 1.33333, {{codecomment|// aspect ratio}} | ||
0.85 //UI scale | 0.85 {{codecomment|// UI scale}} | ||
]</code> |= | ]</code> |Example 2= | ||
|x3= <code>_res = [[getResolution]]; // | |x3= <code>_res = [[getResolution]]; {{codecomment|// a triple 16/9 monitor setup}}</code> | ||
<code>[ | <code>[ | ||
5760, //width | 5760, {{codecomment|// width}} | ||
1080, //height | 1080, {{codecomment|// height}} | ||
792, //2D viewport width | 792, {{codecomment|// 2D viewport width}} | ||
594, //2D viewport height | 594, {{codecomment|// 2D viewport height}} | ||
5.33333, //aspect ratio | 5.33333, {{codecomment|// aspect ratio}} | ||
0.55 //UI scale | 0.55 {{codecomment|// UI scale}} | ||
]</code> |= | ]</code> |Example 3= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| [[worldToScreen]], [[screenToWorld]] | | | [[worldToScreen]], [[screenToWorld]], [[safeZoneX]], [[safeZoneY]], [[safeZoneW]], [[safeZoneH]] |See also= | ||
}} | }} | ||
Line 56: | Line 60: | ||
<dd class="notedate">Posted on 05:38, 20 December 2010</dd> | <dd class="notedate">Posted on 05:38, 20 December 2010</dd> | ||
<dt class="note">[[User:Tom 48 97|tom_48_97]]</dt> | <dt class="note">[[User:Tom 48 97|tom_48_97]]</dt> | ||
<dd class="note">This command can be | <dd class="note">This command can be useful to play a video (see this function [[BIS_fnc_playVideo]]) in the given format if you have compiled it for different UI scale.</dd> | ||
<!-- Note Section END --> | <!-- Note Section END --> | ||
</dl> | </dl> | ||
Line 64: | Line 68: | ||
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]] | [[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]] | ||
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]] | [[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]] | ||
[[Category:ArmA 2 OA: New Scripting Commands List|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]] | |||
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]] | [[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]] | ||
Revision as of 14:48, 17 January 2019
Description
- Description:
- Returns an array containing all information about resolution. Template:Feature Arma3
- Groups:
- Uncategorised
Syntax
- Syntax:
- getResolution
- Return Value:
- Array - to format [width, height, uiViewPortWidth, uiViewPortHeight, aspectRatio, uiScale]
Examples
- Example 1:
_res = getResolution; // a 16/9 single monitor setup
[ 1360, // width 768, // height 867, // 2D viewport width 653, // 2D viewport height 1.77778, // aspect ratio 0.85 // UI scale ]
- Example 2:
_res = getResolution; // dedicated server
[ 160, // width 120, // height 136, // 2D viewport width 102, // 2D viewport height 1.33333, // aspect ratio 0.85 // UI scale ]
- Example 3:
_res = getResolution; // a triple 16/9 monitor setup
[ 5760, // width 1080, // height 792, // 2D viewport width 594, // 2D viewport height 5.33333, // aspect ratio 0.55 // UI scale ]
Additional Information
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
- Posted on 05:38, 20 December 2010
- tom_48_97
- This command can be useful to play a video (see this function BIS_fnc_playVideo) in the given format if you have compiled it for different UI scale.
Bottom Section
Categories:
- Scripting Commands
- Introduced with Arma 2: Operation Arrowhead version 1.55
- Arma 2: Operation Arrowhead: New Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Command Group: Uncategorised
- Scripting Commands ArmA2
- ArmA 2 OA: New Scripting Commands List
- Scripting Commands Take On Helicopters
- Scripting Commands Arma 3