Space Engineers
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Properties | List of all members
Sandbox.Game.Gui.MyTerminalControl< TBlock > Class Template Referenceabstract

Terminal control for specified block type. E.g. Torque slider for stator More...

Inheritance diagram for Sandbox.Game.Gui.MyTerminalControl< TBlock >:
Sandbox.Game.Gui.ITerminalControl Sandbox.ModAPI.Interfaces.Terminal.IMyTerminalControl Sandbox.Game.Gui.MyTerminalControlButton< TBlock > Sandbox.Game.Gui.MyTerminalControlCombobox< TBlock > Sandbox.Game.Gui.MyTerminalControlListbox< TBlock > Sandbox.Game.Gui.MyTerminalControlSeparator< TBlock > Sandbox.Game.Screens.Terminal.Controls.MyTerminalControlLabel< TBlock > Sandbox.Game.Screens.Terminal.Controls.MyTerminalValueControl< TBlock, TValue > Sandbox.Game.Screens.Terminal.Controls.MyTerminalControlProperty< TBlock, TValue >

Public Member Functions

delegate void WriterDelegate (TBlock block, StringBuilder writeTo)
 
MyGuiControlBase GetGuiControl ()
 Returns control to show in terminal. When control does not exists yet, it creates it More...
 
 MyTerminalControl (string id)
 
void UpdateVisual ()
 This updates a control that is currently displayed, allowing you to refresh it's state More...
 
void RedrawControl ()
 Recreates the control GUI. This allows you to update the Title of some controls. More...
 

Public Attributes

readonly string Id
 
Func< TBlock, bool > Enabled = (b) => true
 
Func< TBlock, bool > Visible = (b) => true
 

Static Public Attributes

static readonly float PREFERRED_CONTROL_WIDTH = 400f / MyGuiConstants.GUI_OPTIMAL_SIZE.X
 
static readonly MyTerminalBlock[] Empty = new MyTerminalBlock[0]
 

Protected Member Functions

abstract MyGuiControlBase CreateGui ()
 Called when app needs GUI (not on DS) More...
 
virtual void OnUpdateVisual ()
 Called when GUI needs update More...
 

Properties

ArrayOfTypeEnumerator< MyTerminalBlock, ArrayEnumerator< MyTerminalBlock >, TBlock > TargetBlocks [get]
 
TBlock FirstBlock [get]
 
bool SupportsMultipleBlocks [get, set]
 
MyTerminalAction< TBlock >[] Actions [get, protected set]
 
- Properties inherited from Sandbox.Game.Gui.ITerminalControl
string Id [get]
 
bool SupportsMultipleBlocks [get]
 If control supports multiple blocks The only control which does not is Name editor control More...
 
MyTerminalBlock[] TargetBlocks [get, set]
 Sets blocks which are controlled now More...
 
ITerminalAction[] Actions [get]
 Returns terminal actions More...
 
- Properties inherited from Sandbox.ModAPI.Interfaces.Terminal.IMyTerminalControl
string Id [get]
 Identifier of control More...
 
Func< IMyTerminalBlock, bool > Enabled [set]
 Allows you to set if the control is enabled More...
 
Func< IMyTerminalBlock, bool > Visible [set]
 Allows you to set if the control is visible More...
 
bool SupportsMultipleBlocks [get, set]
 Allows you to set if the control is visible when the block is selected as a group More...
 

Detailed Description

Terminal control for specified block type. E.g. Torque slider for stator

Type Constraints
TBlock :MyTerminalBlock 

Definition at line 19 of file MyTerminalControl.cs.

Constructor & Destructor Documentation

Sandbox.Game.Gui.MyTerminalControl< TBlock >.MyTerminalControl ( string  id)
inline

Definition at line 75 of file MyTerminalControl.cs.

Member Function Documentation

abstract MyGuiControlBase Sandbox.Game.Gui.MyTerminalControl< TBlock >.CreateGui ( )
protectedpure virtual
MyGuiControlBase Sandbox.Game.Gui.MyTerminalControl< TBlock >.GetGuiControl ( )
inline

Returns control to show in terminal. When control does not exists yet, it creates it

Implements Sandbox.Game.Gui.ITerminalControl.

Definition at line 64 of file MyTerminalControl.cs.

virtual void Sandbox.Game.Gui.MyTerminalControl< TBlock >.OnUpdateVisual ( )
inlineprotectedvirtual
void Sandbox.Game.Gui.MyTerminalControl< TBlock >.RedrawControl ( )
inline

Recreates the control GUI. This allows you to update the Title of some controls.

Implements Sandbox.ModAPI.Interfaces.Terminal.IMyTerminalControl.

Definition at line 105 of file MyTerminalControl.cs.

void Sandbox.Game.Gui.MyTerminalControl< TBlock >.UpdateVisual ( )
inline

This updates a control that is currently displayed, allowing you to refresh it's state

Implements Sandbox.ModAPI.Interfaces.Terminal.IMyTerminalControl.

Definition at line 97 of file MyTerminalControl.cs.

delegate void Sandbox.Game.Gui.MyTerminalControl< TBlock >.WriterDelegate ( TBlock  block,
StringBuilder  writeTo 
)

Member Data Documentation

readonly MyTerminalBlock [] Sandbox.Game.Gui.MyTerminalControl< TBlock >.Empty = new MyTerminalBlock[0]
static

Definition at line 26 of file MyTerminalControl.cs.

Func<TBlock, bool> Sandbox.Game.Gui.MyTerminalControl< TBlock >.Enabled = (b) => true

Definition at line 30 of file MyTerminalControl.cs.

readonly string Sandbox.Game.Gui.MyTerminalControl< TBlock >.Id

Definition at line 28 of file MyTerminalControl.cs.

readonly float Sandbox.Game.Gui.MyTerminalControl< TBlock >.PREFERRED_CONTROL_WIDTH = 400f / MyGuiConstants.GUI_OPTIMAL_SIZE.X
static

Definition at line 25 of file MyTerminalControl.cs.

Func<TBlock, bool> Sandbox.Game.Gui.MyTerminalControl< TBlock >.Visible = (b) => true

Definition at line 31 of file MyTerminalControl.cs.

Property Documentation

MyTerminalAction<TBlock> [] Sandbox.Game.Gui.MyTerminalControl< TBlock >.Actions
getprotected set

Definition at line 116 of file MyTerminalControl.cs.

TBlock Sandbox.Game.Gui.MyTerminalControl< TBlock >.FirstBlock
getprotected

Definition at line 46 of file MyTerminalControl.cs.

bool Sandbox.Game.Gui.MyTerminalControl< TBlock >.SupportsMultipleBlocks
getset

Definition at line 73 of file MyTerminalControl.cs.

Definition at line 38 of file MyTerminalControl.cs.


The documentation for this class was generated from the following file: