setUserActionText: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<h3 style='display:none'>Notes</h3> <dl class='command_description'> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl> <h3 style='display:none'>Bottom Section</h3>" to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame( +[0-9])?|Game [Vv]ersion( +[0-9])?|Game Version \(number surrounded by NO SPACES\)|Arguments in MP|MP[Aa]rg|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects...)
Line 1: Line 1:
{{Command|Comments=
{{Command


| arma3 |Game name=
| arma3


|0.50|Game version=
|0.50


|arg= global |Multiplayer Arguments=
|arg= global


|eff= local |Multiplayer Effects=
|eff= local


|gr1= Interaction |GROUP1=
|gr1= Interaction


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


| object '''setUserActionText''' [actionIndex, textMenu, textWindowBackground, textWindowForeground] |SYNTAX=


|p1= object: [[Object]] - object the action is added to  |PARAMETER1=
| object '''setUserActionText''' [actionIndex, textMenu, textWindowBackground, textWindowForeground]


|p2= [actionIndex, textMenu, textWindowBackground, textWindowForeground] : [[Array]] |PARAMETER2=
|p1= object: [[Object]] - object the action is added to


|p3= actionIndex: [[Number]] - action id returned by [[addAction]] |PARAMETER3=
|p2= [actionIndex, textMenu, textWindowBackground, textWindowForeground] : [[Array]]


|p4= textMenu: [[String]] or [[Structured Text]] - Text title shown in scroll action menu |PARAMETER4=
|p3= actionIndex: [[Number]] - action id returned by [[addAction]]
|p5= textWindowBackground (Optional): [[String]] or [[Structured Text]] - Text displayed at background (''Since Arma 3 v1.61.136587'') |PARAMETER5=
|p6= textWindowForeground (Optional): [[String]] or [[Structured Text]] - Text displayed at foreground (''Since Arma 3 v1.61.136587'')|PARAMETER6=


| [[Nothing]] |RETURNVALUE=  
|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'')
|p6= textWindowForeground (Optional): [[String]] or [[Structured Text]] - Text displayed at foreground (''Since Arma 3 v1.61.136587'')
 
| [[Nothing]]




|x1= <code>_id = [[player]] [[addAction]] ["Hello", ""];
|x1= <code>_id = [[player]] [[addAction]] ["Hello", ""];
[[player]] [[setUserActionText]] [_id, "Good Bye"];</code>|EXAMPLE1=
[[player]] [[setUserActionText]] [_id, "Good Bye"];</code>


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


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


| |MPBEHAVIOUR=
|
}}
}}



Revision as of 12:10, 18 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