BIS fnc GUImessage: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
(Redirect)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
#REDIRECT [[BIS_fnc_guiMessage]]
{{Function|= Comments
____________________________________________________________________________________________
 
| tkoh |= Game name
 
|1.00|= Game version
____________________________________________________________________________________________
 
| <pre>/*
 
Description:
Displays message window
 
Parameter(s):
0: STRING or STRUCTURED TEXT - message body
1: STRING - message header
2:
BOOL - enable/disable "OK" button
TEXT - set "OK" button's text (enabling it automatically)
3:
BOOL - enable/disable "Cancel" button
TEXT - set "Cancel" button's text (enabling it automatically)
4: DISPLAY - parent display
5: BOOL - when true, function will try to use control inherited from 'RscMessageBox' in display instead of creating a new one
6: BOOL - true to pause the game, false to let it running
 
Returns:
BOOL - true if "OK" button was activated, false if "Cancel" was activated or user pressed "Escape" key.
*/
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
____________________________________________________________________________________________
 
| <!-- [] call [[BIS_fnc_GUImessage]]; --> |= Syntax
 
|p1= |= Parameter 1
 
| |= Return value
____________________________________________________________________________________________
 
|x1= <code></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: