closeDialog: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (Dialog is not instantly closed (copied from closeDisplay))
 
(42 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| ofp |= Game name
|game1= ofp
|version1= 1.75


|1.5|= Game version
|game2= ofpe
|version2= 1.00


|arg= local |= Arguments in MP
|game3= arma1
|version3= 1.00


|eff= local |= Effects in MP
|game4= arma2
____________________________________________________________________________________________
|version4= 1.00


| Close the currently active user dialog with exit code. Most common exit codes are:
|game5= arma2oa
<code>#define IDC_OK            1 //emulate "Ok" button</code>
|version5= 1.50
<code>#define IDC_CANCEL        2 //emulate "Cancel" button</code>|= Description
____________________________________________________________________________________________


| '''closeDialog''' exitcode |= Syntax
|game6= tkoh
|version6= 1.00


|p1= exitcode : [[Number]] |= Parameter 1
|game7= arma3
|version7= 0.50


| [[Nothing]] |= Return value
|arg= local
____________________________________________________________________________________________
 
|x1= <code>[[closeDialog]] 2;</code>|= Example 1


|x2= <code>#define IDC_CANCEL 2
|eff= local
[[closeDialog]] IDC_CANCEL;</code> |= Example 2
____________________________________________________________________________________________


| [[createDialog]], [[dialog]], [[closeDisplay]] |= See also
|gr1= GUI Control


}}
|descr= Closes the currently active dialog with exit code. It does not instantly close the dialog 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>
 
|s1= [[closeDialog]]  exitcode
 
|p1= exitcode: [[Number]]


<h3 style="display:none">Notes</h3>
|r1= [[Nothing]]
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
|x1= <sqf>closeDialog 2;</sqf>
</dl>


<h3 style="display:none">Bottom Section</h3>
|x2= <sqf>
#define IDC_CANCEL 2
closeDialog IDC_CANCEL;
</sqf>


[[Category:Scripting Commands|CLOSEDIALOG]]
|seealso= [[createDialog]] [[dialog]] [[closeDisplay]]
[[Category:Scripting Commands OFP 1.99|CLOSEDIALOG]]
}}
[[Category:Scripting Commands OFP 1.96|CLOSEDIALOG]]
[[Category:Scripting Commands ArmA|CLOSEDIALOG]]
[[Category:Command_Group:_GUI_Control|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Interaction|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]

Latest revision as of 23:42, 11 November 2023

Hover & click on the images for description

Description

Description:
Closes the currently active dialog with exit code. It does not instantly close the dialog 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:
GUI Control

Syntax

Syntax:
closeDialog exitcode
Parameters:
exitcode: Number
Return Value:
Nothing

Examples

Example 1:
closeDialog 2;
Example 2:
#define IDC_CANCEL 2 closeDialog IDC_CANCEL;

Additional Information

See also:
createDialog dialog closeDisplay

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