BIS fnc GUImessage: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Changed the formatting to better match with the rest of the wiki and added function information)
(Redirect)
 
Line 1: Line 1:
 
#REDIRECT [[BIS_fnc_guiMessage]]
{{Function|= Comments
____________________________________________________________________________________________
 
| tkoh |= Game name
 
|1.00|= Game version
____________________________________________________________________________________________
 
| Creates a fully dynamic GUI message box in the center of the player's screen. |= Description
____________________________________________________________________________________________
 
| [body, header, OKbutton, Cancelbutton, display, inheritClass, pauseGame] call '''BIS_fnc_GUImessage''' |= Syntax
 
|p1= [''body'', ''header'', ''OKbutton'', ''Cancelbutton'', ''display'', ''inheritClass'', ''pauseGame'']: [[Array]]  |= PARAMETER1
 
|p2= body: [[String]] or [[Structured_Text|Structured Text]] (optional) - Default: "".  |= PARAMETER2
 
|p3= header: [[String]] (optional) - Default: "". |= PARAMETER3
 
|p4= OKbutton: [[Boolean]] or [[String]] (optional) - True/False to enable/disable button with default string of "OK", or enable the button with the input string. Default: true. |= PARAMETER4
 
|p5= Cancelbutton: [[Boolean]] or [[String]] (optional) - True/False to enable/disable button with default string of "CANCEL", or enable the button with the input string. Default: false. |= PARAMETER5
 
|p6= display: [[Display]] (optional) - Default: Main display of current mission/intro/outro. |= PARAMETER6
 
|p7= inheritClass: [[Boolean]] (optional) - True to use "RscMessageBox" class from the current display, false to use BIS-created "RscMessageBox" class. Default: false. |= PARAMETER7
 
|p8= pauseGame: [[Boolean]] (optional) - Default: true. |= PARAMETER8
 
| [[Boolean]] - true if "OK" button was activated, false if "Cancel" was activated or user pressed "Escape" key. |= RETURNVALUE
____________________________________________________________________________________________
 
|x1= <code>["Example Body", "Example Header", [[true]], [[true]], [[findDisplay]] 46, [[false]], [[true]]] [[call]] [[BIS_fnc_GUImessage]];</code> |=
|x2= <code>[<nowiki></nowiki>[[composeText]] ["Example", [[lineBreak]], "Body"], "Example Header", [[true]], [[true]], [[findDisplay]] 46, [[false]], [[true]]] [[call]] [[BIS_fnc_GUImessage]];</code> |=
____________________________________________________________________________________________
 
| [[BIS_fnc_GUIhint]] |= See also
 
}}
 
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
 
<!-- Note Section END -->
</dl>
 
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: GUI|{{uc:GUImessage}}]]
[[Category:Functions|{{uc:GUImessage}}]]
[[Category:{{Name|tkoh}}: Functions|{{uc:GUImessage}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:GUImessage}}]]
 
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on December 24, 2014 - 03:52 (UTC)</dd>
<dt class="note">[[User:DreadedEntity|DreadedEntity]]</dt>
<dd class="note">
Some code that should produce a "Mission Credits" GUI (tested with a sample array, not actual MP). Lists all connected players.
<code>_allPlayers = "[[composeText]] [";
{
[[if]] ([[isPlayer]] _x) [[then]]
{
_allPlayers = [[format]] ["%1'%2'", _allPlayers, [[name]] _x];
[[if]] (_forEachIndex < (([[count]] [[playableUnits]]) - 1)) [[then]]
{
_allPlayers = [[format]] ["%1,lineBreak,", _allPlayers];
};
};
}[[forEach]] [[playableUnits]];
_allPlayers = [[format]] ["%1];", _allPlayers];
 
_structuredText = [[call]] [[compile]] _allPlayers;
 
[_structuredText, "Mission Credits", "THANK YOU", "THANK YOU", [[findDisplay]] 46, [[false]], [[true]]] [[spawn]] [[BIS_fnc_GUImessage]];</code>
</dd>
</dl>
<!-- DISCONTINUE Notes -->

Latest revision as of 01:28, 26 December 2014

Redirect to: