setUserActionText: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " \| *(game[0-9]|version[0-9]|gr[0-9]|serverExec|mp|pr|descr|s[0-9]|p[0-9]{1,3}|r[0-9]|x1?[0-9]|seealso) *= +" to " |$1= ") |
Lou Montana (talk | contribs) m (Text replacement - "\|s([0-9])\= ([^' ]+)'''([^' ]+)'''([^ ]*) " to "|s$1= $2$3$4 ") |
||
Line 15: | Line 15: | ||
[[Image:setUserActionText.jpg|500px]] | [[Image:setUserActionText.jpg|500px]] | ||
|s1= object | |s1= object [[setUserActionText]] [actionIndex, textMenu, textWindowBackground, textWindowForeground] | ||
|p1= object: [[Object]] - object the action is added to | |p1= object: [[Object]] - object the action is added to |
Revision as of 18:09, 20 June 2021
Description
- Description:
- Changes user added action (see addAction) menu item text.
Since Arma 3 v1.62 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)
- 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.62)
- textWindowForeground (Optional): String or Structured Text - Text displayed at foreground (Since Arma 3 v1.62)
- 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