Controls container

From TrainzOnline
(Difference between revisions)
Jump to: navigation, search
(Example controls container)
(Example controls container)
Line 56: Line 56:
  
 
==Example controls container==
 
==Example controls container==
See [[KIND_Controlset]].
+
See [[KIND_Controlset#Example_Config.txt| controlset]].
  
 
==Categories==
 
==Categories==
 
[[Category:Config Container]]
 
[[Category:Config Container]]

Revision as of 14:19, 19 October 2011

The controls container is a top-level config.txt file entry used by controlset assets.


The controls container is a list of control subcontainers with no standalone tags. Each control subcontainer uses the following format.

Contents

Supported Tags

Each control subcontainer supports the following tags. Each tag is shown here with its default value.

 name-token          ""
 desc-token          ""
 event               ""
 default-keys        ""
 context             ""
 reassignable        1
 trigger-on-up       0
 trigger-on-down     1
 trigger-on-held     1

name-token

Type: text
Desc: The name of a string table entry with the user visible name of the control in it. This string table entry will be used in the Trainz user interface to refer to the control. It should be very short.

desc-token

Type: text
Desc: The name of a string table entry with the user visible description of the control in it. This string table entry will be used in the Trainz user interface to give detail to the user about the control. It should be fairly short. Optional.

event

Type: text
Desc: The name of the event to trigger when the control is triggered. A script message of the format ("Interface-Event", event) will be posted to any linked library or interior (library/interior assets can specify a control set using the "controlset" tag.

default-keys

Type: text
Desc: A comma separated list of the default keys to map to this control. Use "null" if no default keys are to be set, if multiple keys are required separate the keys with a space, e.g. "shift n".

context

Type: text
Desc: A semicolon separated list of contexts under which the control should be active, e.g. "surveyor;driver".
Possible values: menu, surveyor, surveyor-topology, surveyor-paint, surveyor-objects, surveyor-track, surveyor-trains, surveyor-tools, surveyor-layers, river, driver-cab, driver-cab-steam, driver-dcc, railyard

reassignable

Type: bool
Desc: Whether the control supports player reassignment in the options menus.

trigger-on-up

Type: bool
Desc: Whether the control event should trigger on key up.

trigger-on-down

Type: bool
Desc: Whether the control event should trigger on key down.

trigger-on-held

Type: bool
Desc: Whether the control event should repeatedly trigger while a key remains held.


Example controls container

See controlset.

Categories

Personal tools