| Functions Documentation | |
| Name | scrAddAction |
| 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 |
| Returns | nothing? |
| Category | screen, 1.04 |
| Description | Allows dynamic creation of dockscreen actions from code. |
| Example |
<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 (November '25) |
| Featured Mods (random) |
| New Playerships |
| Mining Pack v1.04 |
| Quality Mods (random) |
| Stargate Dock n Go |
| Throwable shield generator V.60 |
| Balanced Mods (random) |
| Tech Analyzer |
| New Shields |