setUserActionText: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\|x([0-9])= *<code>([^<]*)<\/code>" to "|x$1= <sqf>$2</sqf>")
m (Some wiki formatting)
Line 31: Line 31:
player setUserActionText [_id, "Good Bye"];</sqf>
player setUserActionText [_id, "Good Bye"];</sqf>


|x2= <code>_id = billboard [[addAction]] ["Some Action", {}];
|x2= <sqf>
billboard [[setUserActionText]] [
_id = billboard addAction ["Some Action", {}];
billboard setUserActionText [
_id,  
_id,  
"Some Action",  
"Some Action",  
<nowiki>"<t color='#ff0000'>Background-----------------</t><br>Multiline<br>Multiline<br>Multiline<br>. . ."</nowiki>,  
"<t color='#ff0000'>Background-----------------</t><br>Multiline<br>Multiline<br>Multiline<br>. . .",  
<nowiki>"<t color='#00ff00'>-----------------Foreground</t>"</nowiki>
"<t color='#00ff00'>-----------------Foreground</t>"
];</code>
];
</sqf>


|seealso= [[actionIDs]] [[actionParams]] [[addAction]] [[inGameUISetEventHandler]] [[showHUD]] [[inputAction]] [[removeAction]] [[removeAllActions]] [[action]]
|seealso= [[actionIDs]] [[actionParams]] [[addAction]] [[inGameUISetEventHandler]] [[showHUD]] [[inputAction]] [[removeAction]] [[removeAllActions]] [[action]]
}}
}}

Revision as of 16:17, 13 May 2022

Hover & click on the images for description

Description

Description:
setUserActionText.jpg
Changes user added action (see addAction) menu item text.

Groups:
Interaction

Syntax

Syntax:
object setUserActionText [actionIndex, textMenu, textWindowBackground, textWindowForeground]
Parameters:
object: Object - object the action is added to
actionIndex: Number - action id returned by addAction
textMenu: String or Structured Text - Text title shown in scroll action menu
since Arma 3 logo black.png1.62
textWindowBackground: String or Structured Text - (Optional, default "") background text
since Arma 3 logo black.png1.62
textWindowForeground: String or Structured Text - (Optional, default "") foreground text
Return Value:
Nothing

Examples

Example 1:
_id = player addAction ["Hello", ""]; player setUserActionText [_id, "Good Bye"];
Example 2:
_id = billboard addAction ["Some Action", {}]; billboard setUserActionText [ _id, "Some Action", "<t color='#ff0000'>Background-----------------</t><br>Multiline<br>Multiline<br>Multiline<br>. . .", "<t color='#00ff00'>-----------------Foreground</t>" ];

Additional Information

See also:
actionIDs actionParams addAction inGameUISetEventHandler showHUD inputAction removeAction removeAllActions action

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