{"name":"setUserActionText","title":"setUserActionText","type":"command","url":"https://community.bistudio.com/wiki/setUserActionText","revid":369154,"updated":"2024-09-03T10:34:39Z","groups":["Interaction"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global","effect":"local"},"description":"Changes user added action (see addAction) menu item text.","syntaxes":[{"syntax":"object setUserActionText [actionIndex, textMenu, textWindowBackground, textWindowForeground]","params":[{"name":"object","type":"Object","description":"object the action is added to","type_expr":"Object"},{"name":"actionIndex","type":"Number","description":"action id returned by addAction","type_expr":"Number"},{"name":"textMenu","type":"String or Structured Text","description":"text title shown in scroll action menu","type_expr":"String | Structured Text"},{"name":"textWindowBackground","type":"String or Structured Text","optional":true,"default":"\"\"","description":"background text","type_expr":"String | Structured Text","since":"arma3 1.62","text":"textWindowBackground: String or Structured Text - (Optional, default \"\") background text"},{"name":"textWindowForeground","type":"String or Structured Text","optional":true,"default":"\"\"","description":"foreground text","type_expr":"String | Structured Text","since":"arma3 1.62","text":"textWindowForeground: String or Structured Text - (Optional, default \"\") foreground text"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"object"},"right":{"text":"[actionIndex, textMenu, textWindowBackground, textWindowForeground]"}}],"examples":[{"code":["_id = player addAction [\"Hello\", \"\"];\nplayer setUserActionText [_id, \"Good Bye\"];"]},{"text":"```sqf\n_id = billboard addAction [\"Some Action\", {}];\nbillboard setUserActionText [\n    _id,\n    \"Some Action\",\n    \"<t color='#ff0000'>Background-----------------</t><br>Multiline<br>Multiline<br>Multiline<br>. . .\",\n    \"<t color='#00ff00'>-----------------Foreground</t>\"\n];\n```","code":["_id = billboard addAction [\"Some Action\", {}];\nbillboard setUserActionText [\n\t_id, \n\t\"Some Action\", \n\t\"<t color='#ff0000'>Background-----------------</t><br>Multiline<br>Multiline<br>Multiline<br>. . .\", \n\t\"<t color='#00ff00'>-----------------Foreground</t>\"\n];"]}],"see_also":["actionIDs","actionParams","addAction","inGameUISetEventHandler","showHUD","inputAction","removeAction","removeAllActions","action"]}