BIS fnc guiMessage: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\[\[Arma 3 ([^ACHJKLMTZ|])([^|]+)\]\]" to "Arma 3: $1$2") |
(formatting and execution type) |
||
Line 1: | Line 1: | ||
{{RV|type=function | {{RV|type=function | ||
| arma3 | |game1= arma3 | ||
|1.00 | |version1= 1.00 | ||
|gr1= GUI | |gr1= GUI | ||
| [[File:BIS fnc guiMessage.jpg|thumb|right|GUI message in {{arma3}}]] Shows customized native message box to user. | |descr= [[File:BIS fnc guiMessage.jpg|thumb|right|GUI message in {{arma3}}]] Shows customized native message box to user. | ||
{{Feature | Informative | This syntax is for {{arma3}}. For the {{tkoh}} version, see [[BIS_fnc_guiMessage TKOH]].}} | {{Feature | Informative | This syntax is for {{arma3}}. For the {{tkoh}} version, see [[BIS_fnc_guiMessage TKOH]].}} | ||
| [message, header, okButton, cancelButton, parent, useParentBox, pause)] spawn [[BIS_fnc_guiMessage]] | |s1= [message, header, okButton, cancelButton, parent, useParentBox, pause)] spawn [[BIS_fnc_guiMessage]] | ||
|p1= message: [[String]] or [[Structured Text]] - (Optional, default "") | |p1= message: [[String]] or [[Structured Text]] - (Optional, default "") Message | ||
|p2= header: [[String]] - (Optional) | |p2= header: [[String]] - (Optional) Header text | ||
|p3= okButton: [[Boolean]] or [[String]] (Optional, default [[true]]) | |p3= okButton: [[Boolean]] or [[String]] (Optional, default [[true]]) | ||
* [[Boolean]] - | * [[Boolean]] - Enable "OK" button | ||
* [[String]] - | * [[String]] - Custom text for "OK" button | ||
|p4= cancelButton: [[Boolean]] or [[String]] - (Optional, default [[false]]) | |p4= cancelButton: [[Boolean]] or [[String]] - (Optional, default [[false]]) | ||
* [[Boolean]] - | * [[Boolean]] - Enable "Cancel" button | ||
* [[String]] - | * [[String]] - Custom text for "Cancel" button | ||
|p5= parent: [[Display]] - (Optional, default [[displayNull]]) | |p5= parent: [[Display]] - (Optional, default [[displayNull]]) Parent display | ||
|p6= useParentBox: [[Boolean]] - (Optional, default [[false]]) | |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]]) | |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. | |r1= [[Boolean]] - [[true|True]] if "OK" button was pressed, otherwise false. Returned only after message box is closed. | ||
|x1= <code>["Hello World"] [[spawn]] [[BIS_fnc_guiMessage]];</code> | |x1= <code>["Hello World"] [[spawn]] [[BIS_fnc_guiMessage]];</code> | ||
|x2= <code>_result = ["Are you sure?", "Confirm", [[true]], [[true]]] [[ | |x2= <code>_result = ["Are you sure?", "Confirm", [[true]], [[true]]] [[spawn]] [[BIS_fnc_guiMessage]];</code> | ||
|seealso= [[hintC]], [[BIS_fnc_GUIhint]] [[BIS_fnc_3DENShowMessage]] | |seealso= [[hintC]], [[BIS_fnc_GUIhint]] [[BIS_fnc_3DENShowMessage]] | ||
|exec= spawn | |||
}} | }} | ||
Line 67: | Line 69: | ||
</dl> | </dl> | ||
Revision as of 08:03, 3 May 2021
Description
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] spawn BIS_fnc_guiMessage;
Additional Information
- See also:
- hintCBIS_fnc_GUIhint BIS_fnc_3DENShowMessage
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
- 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.