closeDisplay: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Fix example)
 
(58 intermediate revisions by 14 users not shown)
Line 1: Line 1:
[[Category:Scripting Commands|CLOSEDISPLAY]]
{{RV|type=command
[[Category:Scripting Commands ArmA|CLOSEDISPLAY]]


|game1= arma1
|version1= 1.00


<h2 style="color:#000066">'''''display'' closeDisplay ''exitcode'''''</h2>
|game2= arma2
|version2= 1.00


|game3= arma2oa
|version3= 1.50


'''Operand types:'''
|game4= tkoh
|version4= 1.00


'''display''': [[Display]]
|game5= arma3
   
|version5= 0.50
'''exitcode''': [[Number]]


'''Type of returned value:'''
|gr1= GUI Control


[[Nothing]]
|descr= Closes given display with exit code. It does not instantly close the display but does it on next simulation cycle. Most common exit codes are:
<syntaxhighlight lang="cpp">
#define IDC_OK 1 // emulate "OK" button
#define IDC_CANCEL 2 // emulate "Cancel" button
</syntaxhighlight>
{{Feature|important|Sometimes when one display is opened on top of another display the previous display may not close properly; some display EHs such as "onUnload" may never fire.
Use this command to manually handle such displays.}}


'''Compatibility:'''
|s1= display [[closeDisplay]] exitCode


Version 2.53 required.
|p1= display: [[Display]]


'''Description:'''
|p2= exitCode: [[Number]]


Close given display.
|r1= [[Nothing]]


|x1= <sqf>_display closeDisplay 1;</sqf>


'''Example''':
|x2= <sqf>
#define IDC_OK 1
_display closeDisplay IDC_OK;
</sqf>


_display '''closeDisplay''' IDC_OK
|seealso= [[createDisplay]] [[closeDialog]]
}}

Latest revision as of 11:11, 1 July 2022

Hover & click on the images for description

Description

Description:
Closes given display with exit code. It does not instantly close the display but does it on next simulation cycle. Most common exit codes are:
#define IDC_OK		1 // emulate "OK" button
#define IDC_CANCEL	2 // emulate "Cancel" button
Sometimes when one display is opened on top of another display the previous display may not close properly; some display EHs such as "onUnload" may never fire. Use this command to manually handle such displays.
Groups:
GUI Control

Syntax

Syntax:
display closeDisplay exitCode
Parameters:
display: Display
exitCode: Number
Return Value:
Nothing

Examples

Example 1:
_display closeDisplay 1;
Example 2:
#define IDC_OK 1 _display closeDisplay IDC_OK;

Additional Information

See also:
createDisplay closeDialog

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