I don't think this answers all of your questions, but I've made a (very) basic tutorial on the new method for defining actions and therefore actionStatus anyway.
The key .xml files to look through for dockscreen info/examples are:
RPGCode.xml
RPGDockScreens.xml
RPGShipScreens.xml
Instead of just using the old method of defining actions:
Code: Select all
<Action name="Done" cancel="1" key="D">
<Exit/>
</Action>
You can now use this new method for finer control:
Code: Select all
<Action id="actionDone" cancel="1">
<Exit/>
</Action>
Followed later on in the same dockscreen type definition by a list of texts that can appear in it:
Code: Select all
...
<Language>
<Text id="actionDone">"[D]one"</Text>
<Text id="actionDone:DefaultDesc">"I suppose you could use this text block to appear beneath the action by default."</Text>
<Text id="actionDone:UnavailableDesc">"This description could appear beneath the action to explain why it might be disabled."</Text>
<Text id="someSpecificScreenDesc">
(cat
"Welcome to the " (objGetName gSource) " Screen Description."
)
</Text>
</Language>
</DockScreen>
You choose which texts will display in the dockscreen via the <OnPaneInit> event:
Code: Select all
<DockScreens>
<Main>
<Panes>
<Default>
<OnPaneInit>
(block (actionStatus)
; Potential Screen Description(s) (just use a switch statement or something to select between multiples)
(scrSetDescTranslate gScreen 'someSpecificScreenDesc)
; Done Action
(setq actionStatus (rpgCalcThisIsABasicTutorialDoneAction))
(scrShowAction gScreen 'actionDone (@ actionStatus 'visible))
(scrEnableAction gScreen 'actionDone (@ actionStatus 'enabled))
(scrSetActionDesc gScreen 'actionDone (@ actionStatus 'desc))
</OnPaneInit>
...
Which uses a function rpgCalcThisIsABasicTutorialDoneAction (that is traditionally defined as a global in rpgCode.xml) to determine which option to use:
Code: Select all
<Globals>
(block nil
(setq rpgCalcThisIsABasicTutorialDoneAction
(lambda nil
(switch
(someconditionalstatementthatdeterminesiftheactionisavailable)
{
visible: True
enabled: Nil
desc: (scrTranslate gScreen "actionDone:UnavailableDesc")
}
{
visible: True
enabled: True
desc: (scrTranslate gScreen "actionDone:DefaultDesc")
}
)
)
)
...
If you just leave the "visible" option as "visible: Nil", "enabled" and "desc" seem to default to Nil also. You would therefore not need to specify them.
Also note where curly brackets are used instead of parenthesis in rpgCalcThisIsABasicTutorialDoneAction. This means that the function will return a list of three elements:
{ visible:#### enabled:#### desc:#### }
These would generally use values like:
{ visible:True/Nil enabled:True/Nil desc:(scrTranslate gScreen "action####:####")/Nil }