closeDisplay: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Game version" to "|Game version=")
Line 8: Line 8:


| 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:
| 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:
<code>#define IDC_OK           1 //emulate "Ok" button</code>
<syntaxhighlight lang="cpp">
<code>#define IDC_CANCEL       2 //emulate "Cancel" button</code>
#define IDC_OK 1 // emulate "OK" button
#define IDC_CANCEL 2 // emulate "Cancel" button
</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=
{{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=
____________________________________________________________________________________________
____________________________________________________________________________________________


| display '''closeDisplay''' exitcode |SYNTAX=
| display [[closeDisplay]] exitCode |SYNTAX=


|p1= display: [[Display]] |PARAMETER1=
|p1= display: [[Display]] |PARAMETER1=


|p2= exitcode: [[Number]] |PARAMETER2=
|p2= exitCode: [[Number]] |PARAMETER2=


| [[Nothing]] |RETURNVALUE=
| [[Nothing]] |RETURNVALUE=
Line 25: Line 27:


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


|[[createDisplay]], [[closeDialog]]|SEEALSO=
|[[createDisplay]], [[closeDialog]]|SEEALSO=
}}
}}


Line 41: Line 42:
<h3 style="display:none">Bottom Section</h3>
<h3 style="display:none">Bottom Section</h3>


[[Category:Scripting Commands|CLOSEDISPLAY]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA|CLOSEDISPLAY]]
[[Category:Scripting Commands ArmA|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
Line 48: Line 49:
[[Category:Command_Group:_GUI_Control|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_GUI_Control|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Interaction|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Interaction|{{uc:{{PAGENAME}}}}]]
<!-- CONTINUE Notes -->
<!-- DISCONTINUE Notes -->

Revision as of 22:15, 2 September 2019

-wrong parameter ("Arma") defined!-1.00
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, 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.
Groups:
Uncategorised

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

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