closeDisplay: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "|= Game version" to "|Game version=") |
Lou Montana (talk | contribs) |
||
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: | ||
< | <syntaxhighlight lang="cpp"> | ||
#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 | | display [[closeDisplay]] exitCode |SYNTAX= | ||
|p1= display: [[Display]] |PARAMETER1= | |p1= display: [[Display]] |PARAMETER1= | ||
|p2= | |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> | | _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| | [[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]] | ||
[[Category:Scripting Commands ArmA| | [[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}}}}]] | ||
Revision as of 21:15, 2 September 2019
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
- 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