Space Engineers
Public Member Functions | Public Attributes | Protected Member Functions | Properties | List of all members
Sandbox.Game.Gui.MyTerminalControlButton< TBlock > Class Template Reference
Inheritance diagram for Sandbox.Game.Gui.MyTerminalControlButton< TBlock >:
Sandbox.Game.Gui.MyTerminalControl< TBlock > Sandbox.ModAPI.Interfaces.Terminal.IMyTerminalControlButton Sandbox.Game.Gui.ITerminalControl Sandbox.ModAPI.Interfaces.Terminal.IMyTerminalControl Sandbox.ModAPI.Interfaces.Terminal.IMyTerminalControl Sandbox.ModAPI.Interfaces.Terminal.IMyTerminalControlTitleTooltip

Public Member Functions

 MyTerminalControlButton (string id, MyStringId title, MyStringId tooltip, Action< TBlock > action)
 
MyTerminalAction< TBlock > EnableAction (string icon, StringBuilder name, WriterDelegate writer=null)
 
- Public Member Functions inherited from Sandbox.Game.Gui.MyTerminalControl< TBlock >
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

MyStringId Title
 
MyStringId Tooltip
 
- Public Attributes inherited from Sandbox.Game.Gui.MyTerminalControl< TBlock >
readonly string Id
 
Func< TBlock, bool > Enabled = (b) => true
 
Func< TBlock, bool > Visible = (b) => true
 

Protected Member Functions

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

Properties

Action< TBlock > Action [get, set]
 
- Properties inherited from Sandbox.Game.Gui.MyTerminalControl< TBlock >
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...
 
- Properties inherited from Sandbox.ModAPI.Interfaces.Terminal.IMyTerminalControlButton
Action< IMyTerminalBlockAction [get, set]
 The action taken when a button is clicked More...
 
- Properties inherited from Sandbox.ModAPI.Interfaces.Terminal.IMyTerminalControlTitleTooltip
MyStringId Title [get, set]
 Allows you to get or set the Label that appears on the control More...
 
MyStringId Tooltip [get, set]
 Allows you to get or set the tooltip that appears when you hover over the control More...
 

Additional Inherited Members

- Static Public Attributes inherited from Sandbox.Game.Gui.MyTerminalControl< TBlock >
static readonly float PREFERRED_CONTROL_WIDTH = 400f / MyGuiConstants.GUI_OPTIMAL_SIZE.X
 
static readonly MyTerminalBlock[] Empty = new MyTerminalBlock[0]
 

Detailed Description

Type Constraints
TBlock :MyTerminalBlock 

Definition at line 19 of file MyTerminalControlButton.cs.

Constructor & Destructor Documentation

Sandbox.Game.Gui.MyTerminalControlButton< TBlock >.MyTerminalControlButton ( string  id,
MyStringId  title,
MyStringId  tooltip,
Action< TBlock >  action 
)
inline

Definition at line 40 of file MyTerminalControlButton.cs.

Member Function Documentation

override MyGuiControlBase Sandbox.Game.Gui.MyTerminalControlButton< TBlock >.CreateGui ( )
inlineprotectedvirtual

Called when app needs GUI (not on DS)

Implements Sandbox.Game.Gui.MyTerminalControl< TBlock >.

Definition at line 48 of file MyTerminalControlButton.cs.

MyTerminalAction<TBlock> Sandbox.Game.Gui.MyTerminalControlButton< TBlock >.EnableAction ( string  icon,
StringBuilder  name,
WriterDelegate  writer = null 
)
inline

Definition at line 70 of file MyTerminalControlButton.cs.

override void Sandbox.Game.Gui.MyTerminalControlButton< TBlock >.OnUpdateVisual ( )
inlineprotectedvirtual

Called when GUI needs update

Reimplemented from Sandbox.Game.Gui.MyTerminalControl< TBlock >.

Definition at line 65 of file MyTerminalControlButton.cs.

Member Data Documentation

Definition at line 25 of file MyTerminalControlButton.cs.

Definition at line 26 of file MyTerminalControlButton.cs.

Property Documentation

Action<TBlock> Sandbox.Game.Gui.MyTerminalControlButton< TBlock >.Action
getset

Definition at line 28 of file MyTerminalControlButton.cs.


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