BIS fnc GUImessage: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (see also)
No edit summary
Line 58: Line 58:
[[Category:{{Name|tkoh}}: Functions|{{uc:GUImessage}}]]
[[Category:{{Name|tkoh}}: Functions|{{uc:GUImessage}}]]
[[Category:{{Name|arma3}}: 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 -->

Revision as of 05:52, 24 December 2014


Hover & click on the images for description

Description

Description:
/*

	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.
*/
(Placeholder description extracted from the function header by BIS_fnc_exportFunctionsToWiki)
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
Syntax needed
Return Value:
Return value needed

Examples

Example 1:

Additional Information

See also:
BIS_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

Bottom Section

Posted on December 24, 2014 - 03:52 (UTC)
DreadedEntity
Some code that should produce a "Mission Credits" GUI (tested with a sample array, not actual MP). Lists all connected players. _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;