Discuss this page.

Summary

https://github.com/kronosaur/Transcendence/blob/f334d321dbbea5bebd47524391211ac4f0c158ef/Transcendence/CGameKeys.cpp#L87 https://github.com/kronosaur/Transcendence/blob/60651293d51ac1f0decd219828b458c0555fe866/Transcendence/CDockScreenActions.cpp#L815

Rich Text Formatting

FIXME Please correct any inaccuracies.

<DockScreen>

Dockscreens are powerful tools which can be used to display information to the player. When you dock with a station or wreck, what you are seeing is a dockscreen. Dockscreens can be used to play out a story, show data, and allow the player to trigger scripted events.

From the XML'd elementDocument

<DockScreen Attributes="UNID,name,type,backgroundID,desc" >
	<InitialPane></InitialPane>
	<ListOptions Attributes="dataFrom,list,initialItem"></ListOption>
	<OnInit></OnInit>
	<Panes>
		<* Attributes="desc,noListNavigation,showCounter,showTextInput" >
			<Actions>
				<Action Attributes="name,key,default,cancel,nextKey,prevKey" >
					<Exit/>
					<Navigate Attributes="screen" />
					<ShowPane Attributes="pane" />
				</Action>
			</Actions>
		<*/>
	</Panes>
</DockScreen>

A dockscreen's code looks something like this:

<DockScreen UNID="&dsPlanetRefuseDock;"	name= "=(objGetName gSource)">
 
	<Panes>
		<InitialPane desc= "If you attempted to land on a planet without re-entry equipment, you would burn up and/or crash. Both result in death.">
			<Actions>
				<Action name="Continue" imageID="&rsItemListScreen;" imageIndex="0" cancel="1" key="C">
					<Exit/>
				</Action>
			</Actions>
		</InitialPane>
	</Panes>
</DockScreen>

That code is from Schilcote's Dockable Planets mod.

dockscreen desc=“”>, the name of the pane is InitialPane. The desc=“” is the text you see when you view the pane. Then, inside the pane's tags, you have the Action tag. Actions are the little pieces of text which run script when clicked on, or their key is pressed. The name=“” of an action is the text displayed. The cancel=“” is a boolean value which decides whether the action is triggered when the user presses ESC, and the key=“” decides what keyboard key should choose this action.

The <Initialize> element is evaluated:
1. Whenever the pane is displayed (e.g., (scrShowPane) or something).
2. Whenever the player moves the cursor in the list.

Sub elements, attributes and globals

The following are temporary globals available within the DockScreen element.

Example

Here we see gMargin used within the ListOptions element in the dockscreen dsExchangeBuy from Transcendence.xml

      <ListOptions
            dataFrom=   "station"
            list=      "*"
            >
         (switch
            (not gMargin)
               (scrSetListFilter gScreen intComputeSellPrice)
 
            (isfunction gMargin)
               (scrSetListFilter gScreen gMargin)
 
            (scrSetListFilter gScreen "*")
            )
      </ListOptions>

List Options

List Options This is how you build custom dockscreens and what they have on the left side of the screen. Go back to list of tags