PartUIToggle

From Cosmoteer Wiki
< Modding‎ | ComponentsModding/Components/PartUIToggle
Jump to navigation Jump to search

Code locations (what's this?):

Cosmoteer.Ships.Parts.UI.PartUIToggle
Cosmoteer.Ships.Parts.UI.PartUIToggleRules

A part sub-component that tracks a value whose state can be toggled by the player.

Alias "UIToggle", meaning "User Interface Toggle".

Inherits from OperationalPartComponent.

Presumably used by every part with a toggle that's accessible to the player, like all weapons, thruster_boost, etc.

This is what makes buttons work. If you want a clickable toggle in your new part part, add this component.

Parameters (Complete list)
Name Type Required? Buffable? Default value Description
ToggleID ID<PartToggleGuiRules> Yes - -
Default int Yes - - Which of the toggleable choices is active when the part is built.
AvailableChoices List<int>? - - - The list of available choices.
ToggledOnChoices List<int>? - - -
RememberValue bool - - true
RequiresCommand bool - - true
AlwaysAllowInBuildMode bool - - true
AutoOnTrigger ID<PartComponentRules>? - - -
AutoOffTrigger ID<PartComponentRules>? - - -

Notes

Nothing yet.

Examples

CalloutIconWarning.pngWork in Progress
This subsection is currently work-in-progress: Some things may be missing.

Feel free to contribute to make it better!