setUserActionText: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\{\{GameCategory\|(arma[0123])\|[ _]?New[ _]Scripting[ _]Commands[ _]List\}\}" to "{{GameCategory|$1|New Scripting Commands}}")
m (Text replacement - "_{10,} " to "")
Line 1: Line 1:
{{Command|Comments=
{{Command|Comments=
____________________________________________________________________________________________


| arma3 |Game name=
| arma3 |Game name=
Line 11: Line 10:


|gr1= Interaction |GROUP1=
|gr1= Interaction |GROUP1=
____________________________________________________________________________________________


| Changes user added action (see [[addAction]]) menu item text. <br><br>
| Changes user added action (see [[addAction]]) menu item text. <br><br>
Line 18: Line 16:
[[Image:setUserActionText.jpg|500px]]
[[Image:setUserActionText.jpg|500px]]
|DESCRIPTION=
|DESCRIPTION=
____________________________________________________________________________________________


| object '''setUserActionText''' [actionIndex, textMenu, textWindowBackground, textWindowForeground] |SYNTAX=
| object '''setUserActionText''' [actionIndex, textMenu, textWindowBackground, textWindowForeground] |SYNTAX=
Line 45: Line 42:
<nowiki>"<t color='#00ff00'>-----------------Foreground</t>"</nowiki>
<nowiki>"<t color='#00ff00'>-----------------Foreground</t>"</nowiki>
];</code>|EXAMPLE2=
];</code>|EXAMPLE2=
____________________________________________________________________________________________


|  [[actionIDs]], [[actionParams]], [[addAction]], [[inGameUISetEventHandler]], [[showHUD]], [[inputAction]], [[removeAction]], [[removeAllActions]], [[action]] |SEEALSO=  
|  [[actionIDs]], [[actionParams]], [[addAction]], [[inGameUISetEventHandler]], [[showHUD]], [[inputAction]], [[removeAction]], [[removeAllActions]], [[action]] |SEEALSO=  


|  |MPBEHAVIOUR=  
|  |MPBEHAVIOUR=  
____________________________________________________________________________________________
}}
}}



Revision as of 03:59, 17 January 2021

Hover & click on the images for description

Description

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

Since Arma 3 v1.61.136587 it is possible to set 2 more optional texts, one for background and one for foreground when action is displayed on the screen (showWindow = true)

setUserActionText.jpg
Groups:
Interaction

Syntax

Syntax:
object setUserActionText [actionIndex, textMenu, textWindowBackground, textWindowForeground]
Parameters:
object: Object - object the action is added to
[actionIndex, textMenu, textWindowBackground, textWindowForeground] : Array
actionIndex: Number - action id returned by addAction
textMenu: String or Structured Text - Text title shown in scroll action menu
textWindowBackground (Optional): String or Structured Text - Text displayed at background (Since Arma 3 v1.61.136587)
textWindowForeground (Optional): String or Structured Text - Text displayed at foreground (Since Arma 3 v1.61.136587)
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:
actionIDsactionParamsaddActioninGameUISetEventHandlershowHUDinputActionremoveActionremoveAllActionsaction

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