setUserActionText: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\| *((\[\[[a-zA-Z0-9_ |()]+\]\],? ?)+) * \}\}" to "|seealso= $1 }}")
m (Text replacement - "v1\.61\.[0-9]{6}" to "v1.62")
Line 13: Line 13:
| Changes user added action (see [[addAction]]) menu item text. <br><br>
| Changes user added action (see [[addAction]]) menu item text. <br><br>


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'' <nowiki>=</nowiki> [[true]])<br><br>
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'' <nowiki>=</nowiki> [[true]])<br><br>
[[Image:setUserActionText.jpg|500px]]
[[Image:setUserActionText.jpg|500px]]


Line 25: Line 25:


|p4= textMenu: [[String]] or [[Structured Text]] - Text title shown in scroll action menu
|p4= textMenu: [[String]] or [[Structured Text]] - Text title shown in scroll action menu
|p5= textWindowBackground (Optional): [[String]] or [[Structured Text]] - Text displayed at background (''Since Arma 3 v1.61.136587'')
|p5= textWindowBackground (Optional): [[String]] or [[Structured Text]] - Text displayed at background (''Since Arma 3 v1.62'')
|p6= textWindowForeground (Optional): [[String]] or [[Structured Text]] - Text displayed at foreground (''Since Arma 3 v1.61.136587'')
|p6= textWindowForeground (Optional): [[String]] or [[Structured Text]] - Text displayed at foreground (''Since Arma 3 v1.62'')


| [[Nothing]]
| [[Nothing]]

Revision as of 11:21, 3 April 2021

Hover & click on the images for description

Description

Description:
Description needed
Groups:
Interaction

Syntax

Syntax:
Syntax needed
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:
Return value needed

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