[[DockScreen Talk Page|Discuss this page]]. =====Summary===== * * **unid=** * **name=** * "={code}" Runs TLisp code. Must return a string * **desc=** * **type=** * "canvas" * "itemPicker" * "deviceSelector" * "weaponsSelector" * "armorSelector" * "miscSelector" * "customItemPicker" * "customPicker" * "subjugateMinigame" * **inherit=** * **backgroundID=** * UNID * "hero" * "image" * "none" * "object" * "schematic" * **nestedScreen=** * Zero or one or * **dataFrom=** * "player" * "source" * "station" * "={code}" * **criteria=** * **list=** * **initialItem=** * index of an item as it appears in the list * "={code}" * **rowHeight=** * **noArmorSpeedDisplay=** * **slotName=** * **noEmptySlots=** * **posX=** * **posY=** * **width=** * **height=** * Code: Returns a list of entries, each with the following elements * Title * Icon * Description * [Extra] * Zero or one or * **gScreen** * **gSource** * **gData** * Zero or one * **gScreen** * **gSource** * **gData** * Zero or one * Zero or one * **display=** * **animate=** * **type=** Same as **type**. * **dataFrom=** * Zero or one * Zero or more * **left=** * **top=** * **width=** * **height=** * **center=** * **vcenter=** * Zero or more * **id=** * **left=** * **right=** * **top=** * **bottom=** * **font=** * **color=** * **align=** * Zero or more * **left=** * **right=** * **top=** * **bottom=** * **align=** Horizontal alignment. Defaults to the left * "left" * "center" * "right" * **valign=** Vertical alignment. Defaults to the top * "top" * "center" * "bottom" * **transparent=** * Returns: An image desc * * **left=** * **right=** * **top=** * **bottom=** * One * One . The first pane that appears by default when the screen is shown. * **layout=** * "bottomBar" * "left" * "right" * **desc=** * **noListNavigation=** * **showCounter=** * "true" Creates a control element with **id="counter"** and **style="default"** * **showTextInput=** * "true" Creates a control element with **id="textInput"** and **style="default"** * Zero or one or * * * **id=** * **style=** * "default" * "warning" * * **id=** * **style=** * * **id=** * **style=** * * **id=** * **style=** * * **id=** * **style=** * * One or more * **name=** * "[{key}]{text}" Binds {key}. Possible values are the same as those of **key**. If {key} is a letter or number, then it shows up as part of the name with a yellow color. * "*{text}" Same as **default="true"** * "^{text}" Same as **cancel="true"** * ">{text}" Same as **nextKey="1"** * "<{text}" Same as **prevKey="1"** * **id=** The **id** of the 's element that provides this action's name. The must return a string in the same format as **name**. * **descID=** * **prevKey=** Binds Up/Left arrow keys * "1" * "0" * **nextKey=** Binds Down/Right arrow keys * "1" * "0" * **default=** Binds the Enter key. Same as **key="Enter"** * "1" * "0" * **cancel=** Binds the Escape key. Same as **key="Escape"** * "1" * "0" * **key=** Binds the specified key to the action * "1" * "2" * "3" * "4" * "5" * "6" * "7" * "8" * "9" * "0" * "A" * "B" * "C" * "D" * "E" * "F" * "G" * "H" * "I" * "J" * "K" * "L" * "M" * "N" * "O" * "P" * "Q" * "R" * "S" * "T" * "U" * "V" * "W" * "X" * "Y" * "Z" * "Down" * "Right" * "Left" * "Up" * "Escape" * "Enter" or "Return" * "PageUp" * "PageDown" * **minor=** * Zero or one * Zero or one * **screen=** * Zero or one * **pane=** * Code * Zero or more additional panes [[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. ====== 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 [[http://xelerus.de/index.php?s=mod&id=324|XML'd elementDocument]] <* Attributes="desc,noListNavigation,showCounter,showTextInput" > <*/> A dockscreen's code looks something like this: That code is from [[..:users:Schilcote|Schilcote's]] [[http://xelerus.de/index.php?s=mod&id=124|Dockable Planets]] mod. [[modding:xml: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., ([[..:functions:scrShowPane]]) or something). \\ 2. Whenever the player moves the cursor in the list. ===Sub elements, attributes and globals=== The following are temporary [[..:functions:globals]] available within the DockScreen element. * gBuyCriteria * gCost * gItem * gMargin Example Here we see gMargin used within the ListOptions element in the dockscreen dsExchangeBuy from Transcendence.xml (switch (not gMargin) (scrSetListFilter gScreen intComputeSellPrice) (isfunction gMargin) (scrSetListFilter gScreen gMargin) (scrSetListFilter gScreen "*") ) * gPrevScreen * gPrevPane * gBonus === List Options === [[modding/xml/listoptions|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 [[..:XML|tags]]