BIS fnc guiMessage: Difference between revisions
Jump to navigation
Jump to search
m (moved image from note to description) |
Lou Montana (talk | contribs) (Remove TKOH content) |
||
Line 2: | Line 2: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| | | arma3 |Game name= | ||
|1.00|Game version= | |1.00|Game version= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| | | [[File:BIS fnc guiMessage.jpg|thumb|right|GUI message in {{arma3}}]] Shows customized native message box to user. | ||
[[File:BIS fnc guiMessage.jpg|thumb| | {{Informative | This syntax is for {{arma3}}. For the {{tkoh}} version, see [[BIS_fnc_guiMessage TKOH]].}} |DESCRIPTION= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| [message, | | [message, header, okButton, cancelButton, parent, useParentBox, pause)] spawn [[BIS_fnc_guiMessage]] | ||
| | |p1= message: [[String]] or [[Structured Text]] - (Optional, default "") message | ||
| | |p2= header: [[String]] - (Optional) header text | ||
| | |p3= okButton: [[Boolean]] or [[String]] (Optional, default [[true]]) | ||
* [[Boolean]] - enable "OK" button | |||
* [[String]] - custom text for "OK" button | |||
| | |p4= cancelButton: [[Boolean]] or [[String]] - (Optional, default [[false]]) | ||
* [[Boolean]] - enable "Cancel" button | |||
* [[String]] - custom text for "Cancel" button | |||
| | |p5= parent: [[Display]] - (Optional, default [[displayNull]]) parent display | ||
| | |p6= useParentBox: [[Boolean]] - (Optional, default [[false]]) try to use control inherited from "RscMessageBox" in parent instead of creating a new one | ||
| | |p7= pause: [[Boolean]] - (Optional, default [[true]]) pause simulation when message box is open (no effect in multiplayer) | ||
| | | [[Boolean]] - [[true]] if "OK" button was pressed, otherwise false. Returned only after message box is closed. |RETURNVALUE= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| | |x1= <code>["Hello World"] [[spawn]] [[BIS_fnc_guiMessage]];</code> |EXAMPLE1= | ||
|x2= <code>_result = ["Are you sure?", "Confirm", [[true]], [[true]]] [[call]] [[BIS_fnc_guiMessage]];</code> |EXAMPLE2= | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| [[hintC]], [[BIS_fnc_GUIhint]] | | [[hintC]], [[BIS_fnc_GUIhint]] | ||
}} | }} | ||
Line 74: | Line 46: | ||
<!-- Note Section BEGIN --> | <!-- Note Section BEGIN --> | ||
<dd class="notedate">Posted on June 24, 2014 - 00:43 (UTC)</dd> | <dd class="notedate">Posted on June 24, 2014 - 00:43 (UTC)</dd> | ||
<dt class="note">[[User:AgentRevolution|AgentRev]]</dt> | <dt class="note">[[User:AgentRevolution|AgentRev]]</dt> | ||
Line 92: | Line 52: | ||
<code>[[uiNamespace]] [[setVariable]] ["BIS_fnc_guiMessage_status", [[false]]];</code> | <code>[[uiNamespace]] [[setVariable]] ["BIS_fnc_guiMessage_status", [[false]]];</code> | ||
</dd> | </dd> | ||
<dd class="notedate">Posted on January 13, 2016 - 15:16 (UTC)</dd> | <dd class="notedate">Posted on January 13, 2016 - 15:16 (UTC)</dd> | ||
<dt class="note">[[User:Eden|Eden]]</dt> | <dt class="note">[[User:Eden|Eden]]</dt> | ||
Line 104: | Line 60: | ||
<code>[] [[spawn]] | <code>[] [[spawn]] | ||
{ | { | ||
_result = ["Are you sure?", "Confirm", [[true]], [[true]]] [[call]] [[BIS_fnc_guiMessage]]; | [[private]] _result = ["Are you sure?", "Confirm", [[true]], [[true]]] [[call]] [[BIS_fnc_guiMessage]]; | ||
{{cc|Use _result here}} | {{cc|Use _result here}} | ||
};</code> | };</code> | ||
</dd> | </dd> | ||
<dd class="notedate">Posted on November 1, 2017 - 18:35 (UTC)</dd> | <dd class="notedate">Posted on November 1, 2017 - 18:35 (UTC)</dd> | ||
<dt class="note">[[User:demellion|demellion]]</dt> | <dt class="note">[[User:demellion|demellion]]</dt> | ||
<dd class="note"> | <dd class="note"> | ||
'''NOTE''': This function only exists along with mission display ([[findDisplay]] 46). If this function is called before with ''-skipIntro'' parameter enabled (see [[ | '''NOTE''': This function only exists along with mission display ([[findDisplay]] 46). If this function is called before with ''-skipIntro'' parameter enabled (see [[Arma 3 Startup Parameters]]) it will result as [[Void]]. | ||
</dd> | </dd> | ||
<!-- Note Section END --> | |||
</dl> | </dl> | ||
< | |||
<h3 style="display:none">Bottom Section</h3> | |||
[[Category:Function Group: GUI|guiMessage]] |
Revision as of 18:03, 23 April 2020
Description
- Description:
- Shows customized native message box to user.
- Execution:
- call
- Groups:
- Uncategorised
Syntax
- Syntax:
- [message, header, okButton, cancelButton, parent, useParentBox, pause)] spawn BIS_fnc_guiMessage
- Parameters:
- message: String or Structured Text - (Optional, default "") message
- header: String - (Optional) header text
- okButton: Boolean or String (Optional, default true)
- cancelButton: Boolean or String - (Optional, default false)
- parent: Display - (Optional, default displayNull) parent display
- useParentBox: Boolean - (Optional, default false) try to use control inherited from "RscMessageBox" in parent instead of creating a new one
- pause: Boolean - (Optional, default true) pause simulation when message box is open (no effect in multiplayer)
- Return Value:
- Boolean - true if "OK" button was pressed, otherwise false. Returned only after message box is closed.
Examples
- Example 1:
["Hello World"] spawn BIS_fnc_guiMessage;
- Example 2:
_result = ["Are you sure?", "Confirm", true, true] call BIS_fnc_guiMessage;
Additional Information
- See also:
- hintCBIS_fnc_GUIhint
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
- Posted on June 24, 2014 - 00:43 (UTC)
- AgentRev
-
Message boxes can be force-closed with:
uiNamespace setVariable ["BIS_fnc_guiMessage_status", false];
- Posted on January 13, 2016 - 15:16 (UTC)
- Eden
-
Calling this function can cause an game crash. When doing this you have to spawn the function or add an spawn around it so you can use the result:
[] spawn { private _result = ["Are you sure?", "Confirm", true, true] call BIS_fnc_guiMessage; // Use _result here };
- Posted on November 1, 2017 - 18:35 (UTC)
- demellion
- NOTE: This function only exists along with mission display (findDisplay 46). If this function is called before with -skipIntro parameter enabled (see Arma 3 Startup Parameters) it will result as Void.