closeDisplay: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category\: ?Command[ _]Group\:.*\|\{\{uc\:\{\{PAGENAME\}\}\}\}\]\] " to "")
m (Fix example)
 
(27 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma |Game name=
|game1= arma1
|version1= 1.00


|1.00|Game version=
|game2= arma2
|version2= 1.00


|gr1= GUI Control |GROUP1=
|game3= arma2oa
____________________________________________________________________________________________
|version3= 1.50


| 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:
|game4= tkoh
|version4= 1.00
 
|game5= arma3
|version5= 0.50
 
|gr1= GUI Control
 
|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">
<syntaxhighlight lang="cpp">
#define IDC_OK 1 // emulate "OK" button
#define IDC_OK 1 // emulate "OK" button
#define IDC_CANCEL 2 // emulate "Cancel" button
#define IDC_CANCEL 2 // emulate "Cancel" button
</syntaxhighlight>
</syntaxhighlight>
{{Important | Sometimes when one display is opened on top of another display, previous display may not close properly, i.e. some display EHs such as "onUnload" may never fire. Use this command to manually handle such displays.}} |DESCRIPTION=
{{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.}}
 
|s1= display [[closeDisplay]] exitCode


| display [[closeDisplay]] exitCode |SYNTAX=
|p1= display: [[Display]]


|p1= display: [[Display]] |PARAMETER1=
|p2= exitCode: [[Number]]


|p2= exitCode: [[Number]] |PARAMETER2=
|r1= [[Nothing]]


| [[Nothing]] |RETURNVALUE=
|x1= <sqf>_display closeDisplay 1;</sqf>
____________________________________________________________________________________________
 
|x1= <code>_display [[closeDisplay]] 1;</code> |EXAMPLE1=


|x2= <code>#define IDC_OK 1
|x2= <sqf>
_display [[closeDisplay]] IDC_OK;</code> |EXAMPLE2=
#define IDC_OK 1
____________________________________________________________________________________________
_display closeDisplay IDC_OK;
</sqf>


|[[createDisplay]], [[closeDialog]]|SEEALSO=
|seealso= [[createDisplay]] [[closeDialog]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Armed Assault|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Interaction|{{uc:{{PAGENAME}}}}]]

Latest revision as of 12: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