|Syntax||(scrAddAction screen actionID pos label [key] [special] code)|
|Argument List||screen: dockscreen to work on, usually gScreen
actionID: string to identify action with later
pos: number of action to insert this action before
label: string display text of action
[key]: string shortcut key
[special]: list or token describing special functionality
code: code to execute when player selects action
|Description||Allows dynamic creation of dockscreen actions from code.|
<Events> <OnGlobalPaneInit> ; aScreenUNID is the UNID of the screen being shown ; aScreen is the screen name (if this is a local screen) ; aPane is the pane being shown ; shipStatusScreen is the current playership's dockscreen (if (and (eq aScreen (objGetDataField gPlayerShip "shipStatusScreen")) (eq aPane "Default")) (scrAddAction gScreen 'myNewAction 3 "Do something cool" "d" 'default (scrShowScreen gScreen "&scMyCoolScreen;") ) ) </OnGlobalPaneInit> </Events>
|Comment||Meant for use in <OnGlobalPaneInit>, can also be used to make dynamic dockscreens.
Special actions are 'cancel , 'default , 'nextKey , 'prevKey , or a list of these tokens.
"pos" can be -1 to insert as last action on screen.
Implementation discussion available here http://neurohack.com/transcendence/forums/viewtopic.php?t=3537 -- example was adapted from there.
|Mod of the Month (February '17)|
|[Pre-Alpha] Oracus and Domina I: The March of the Heretic|
|Transcendence 1.7 XML _Source|
|Quality Mods (random)|
|Osaka Class Transport [In honor of Frontier 0.5] 1.1e|