setUserActionText: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\|s([0-9])\= ([^' ]+)'''([^' ]+)'''([^ ]*) " to "|s$1= $2$3$4 ")
m (Some wiki formatting)
Line 10: Line 10:
|gr1= Interaction
|gr1= Interaction


|descr= Changes user added action (see [[addAction]]) menu item text. <br><br>
|descr= [[Image:setUserActionText.jpg|right|350px]] Changes user added action (see [[addAction]]) menu item text. <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]]


|s1= object [[setUserActionText]] [actionIndex, textMenu, textWindowBackground, textWindowForeground]
|s1= object [[setUserActionText]] [actionIndex, textMenu, textWindowBackground, textWindowForeground]
Line 19: Line 16:
|p1= object: [[Object]] - object the action is added to
|p1= object: [[Object]] - object the action is added to


|p2= [actionIndex, textMenu, textWindowBackground, textWindowForeground] : [[Array]]
|p2= actionIndex: [[Number]] - action id returned by [[addAction]]
 
|p3= textMenu: [[String]] or [[Structured Text]] - Text title shown in scroll action menu


|p3= actionIndex: [[Number]] - action id returned by [[addAction]]
|p4= textWindowBackground: [[String]] or [[Structured Text]] - (Optional, default "") background text
|p4since= arma3 1.62


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


|r1= [[Nothing]]
|r1= [[Nothing]]

Revision as of 21:57, 2 September 2021

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:
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