closeDialog: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|gr1= GUI Control |GROUP1= |arg= local |Multiplayer Arguments= |eff= local |Multiplayer Effects= |gr1= GUI Control |GROUP1=" to "|arg= local |Multiplayer Arguments= |eff= local |Multiplayer Effects= |gr1= GUI Control |GROUP1=")
m (Dialog is not instantly closed (copied from closeDisplay))
 
(28 intermediate revisions by 2 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 |Multiplayer Arguments=
|game3= arma1
|version3= 1.00


|eff= local |Multiplayer Effects=
|game4= arma2
|version4= 1.00


|gr1= GUI Control |GROUP1=
|game5= arma2oa
____________________________________________________________________________________________
|version5= 1.50


| Close the currently active user dialog with exit code. Most common exit codes are:
|game6= tkoh
<code>#define IDC_OK            1 //emulate "Ok" button</code>
|version6= 1.00
<code>#define IDC_CANCEL        2 //emulate "Cancel" button</code>|DESCRIPTION=
____________________________________________________________________________________________


| '''closeDialog''' exitcode |SYNTAX=
|game7= arma3
|version7= 0.50


|p1= exitcode : [[Number]] |PARAMETER1=
|arg= local


| [[Nothing]] |RETURNVALUE=
|eff= local
____________________________________________________________________________________________
 
|x1= <code>[[closeDialog]] 2;</code>|EXAMPLE1=  


|x2= <code>#define IDC_CANCEL 2
|gr1= GUI Control
[[closeDialog]] IDC_CANCEL;</code> |EXAMPLE2=
____________________________________________________________________________________________


| [[createDialog]], [[dialog]], [[closeDisplay]] |SEEALSO=
|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 Armed Assault|CLOSEDIALOG]]
[[Category:Command_Group:_GUI_Control|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Interaction|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Take On Helicopters|{{uc:{{PAGENAME}}}}]]

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