Space Engineers
Public Member Functions | Events | List of all members
Sandbox.ModAPI.IMyTerminalControls Interface Reference

This interface allows you to query, add or remove terminal controls for a block. The terminal controls are the controls that appear in the terminal screen when you select a block. You may add new controls, remove existing controls, or modify existing controls. More...

Inheritance diagram for Sandbox.ModAPI.IMyTerminalControls:
Sandbox.Game.Gui.MyTerminalControls

Public Member Functions

void GetControls< TBlock > (out List< IMyTerminalControl > items)
 Gets the controls associated with a block. More...
 
void AddControl< TBlock > (IMyTerminalControl item)
 Adds a terminal control to a block. More...
 
void RemoveControl< TBlock > (IMyTerminalControl item)
 Removes a terminal control from a block. More...
 
TControl CreateControl< TControl, TBlock > (string id)
 This creates a control that can be added to a block. More...
 
IMyTerminalControlProperty< TValue > CreateProperty< TValue, TBlock > (string id)
 This creates a property that can be added to a block. A property is not visible on the terminal screen but can hold a value that can be used in programmable blocks. More...
 
void GetActions< TBlock > (out List< IMyTerminalAction > items)
 This allows you to get all actions associated with this block. More...
 
void AddAction< TBlock > (IMyTerminalAction action)
 This allows you to add an action to an assocated block More...
 
void RemoveAction< TBlock > (IMyTerminalAction action)
 This allows you to remove an action from a block More...
 
IMyTerminalAction CreateAction< TBlock > (string id)
 This allows you to create an action to associate with a block More...
 

Events

CustomControlGetDelegate CustomControlGetter
 This event allows you to modify the list of controls that the game displays when a user selects a block. Each time terminal controls are enumerated for a block, this delegate is called, which allows you to modify the control list directly, and remove/add as you see fit before the controls are dispalyed. This is to allow fine grain control of the controls being displayed, so you can display only controls you want to in specific situations (like blocks with different subtypes, or even on specific blocks by entityId) More...
 
CustomActionGetDelegate CustomActionGetter
 This event allows you to modify the list of actions available when a user wants to select an action for a block in the toolbar. Modifying the list in this event modifies the list displayed to the user so that you can customize it in specific situations (like blocks with different subtypes, or even on specific blocks by entityId) More...
 

Detailed Description

This interface allows you to query, add or remove terminal controls for a block. The terminal controls are the controls that appear in the terminal screen when you select a block. You may add new controls, remove existing controls, or modify existing controls.

Definition at line 24 of file IMyTerminalControls.cs.

Member Function Documentation

void Sandbox.ModAPI.IMyTerminalControls.AddAction< TBlock > ( IMyTerminalAction  action)

This allows you to add an action to an assocated block

Template Parameters
TBlockThe ModAPI interface of the associated block
Parameters
actionAn IMyTerminalAction object returned from CreateAction

Implemented in Sandbox.Game.Gui.MyTerminalControls.

void Sandbox.ModAPI.IMyTerminalControls.AddControl< TBlock > ( IMyTerminalControl  item)

Adds a terminal control to a block.

Template Parameters
TBlockThis is the ModAPI interface of the associated block you want to add a terminal control to
Parameters
itemThis is the control you're adding, created with CreateControl or CreateProperty

Implemented in Sandbox.Game.Gui.MyTerminalControls.

IMyTerminalAction Sandbox.ModAPI.IMyTerminalControls.CreateAction< TBlock > ( string  id)

This allows you to create an action to associate with a block

Template Parameters
TBlockThe ModAPI interface of the associated block
Parameters
idA unique identifier for this action
Returns
An IMyTerminalAction object

Implemented in Sandbox.Game.Gui.MyTerminalControls.

TControl Sandbox.ModAPI.IMyTerminalControls.CreateControl< TControl, TBlock > ( string  id)

This creates a control that can be added to a block.

Template Parameters
TControlThe type of control you're creating
TBlockThe ModAPI interface of the associated block
Parameters
idA unique identifier for this control
Returns
Returns an interface to the control you've created depending on TControl

Implemented in Sandbox.Game.Gui.MyTerminalControls.

IMyTerminalControlProperty<TValue> Sandbox.ModAPI.IMyTerminalControls.CreateProperty< TValue, TBlock > ( string  id)

This creates a property that can be added to a block. A property is not visible on the terminal screen but can hold a value that can be used in programmable blocks.

Template Parameters
TValueThe type of property you're creating
TBlockThe ModAPI interface of the associated block
Parameters
idA unique identifier for this property
Returns
Returns an IMyTerminalControlProperty that can be added to a block via AddControl

Implemented in Sandbox.Game.Gui.MyTerminalControls.

void Sandbox.ModAPI.IMyTerminalControls.GetActions< TBlock > ( out List< IMyTerminalAction items)

This allows you to get all actions associated with this block.

Template Parameters
TBlockThe ModAPI interface of the associated block
Parameters
itemsThe list that contains the actions associated with this block

Implemented in Sandbox.Game.Gui.MyTerminalControls.

void Sandbox.ModAPI.IMyTerminalControls.GetControls< TBlock > ( out List< IMyTerminalControl items)

Gets the controls associated with a block.

Template Parameters
TBlockThis is the object builder type of the associated block you want to get terminal controls for
Parameters
itemsThe list that contains the terminal controls for this block

Implemented in Sandbox.Game.Gui.MyTerminalControls.

void Sandbox.ModAPI.IMyTerminalControls.RemoveAction< TBlock > ( IMyTerminalAction  action)

This allows you to remove an action from a block

Template Parameters
TBlockThe ModAPI interface of the associated block
Parameters
actionAn IMyTerminalAction object

Implemented in Sandbox.Game.Gui.MyTerminalControls.

void Sandbox.ModAPI.IMyTerminalControls.RemoveControl< TBlock > ( IMyTerminalControl  item)

Removes a terminal control from a block.

Template Parameters
TBlockThis is the ModAPI interface of the associated block you want to remove a terminal control from
Parameters
itemThis is the control you're removing. Use GetControls to get the item itself.

Implemented in Sandbox.Game.Gui.MyTerminalControls.

Event Documentation

CustomActionGetDelegate Sandbox.ModAPI.IMyTerminalControls.CustomActionGetter

This event allows you to modify the list of actions available when a user wants to select an action for a block in the toolbar. Modifying the list in this event modifies the list displayed to the user so that you can customize it in specific situations (like blocks with different subtypes, or even on specific blocks by entityId)

Definition at line 38 of file IMyTerminalControls.cs.

CustomControlGetDelegate Sandbox.ModAPI.IMyTerminalControls.CustomControlGetter

This event allows you to modify the list of controls that the game displays when a user selects a block. Each time terminal controls are enumerated for a block, this delegate is called, which allows you to modify the control list directly, and remove/add as you see fit before the controls are dispalyed. This is to allow fine grain control of the controls being displayed, so you can display only controls you want to in specific situations (like blocks with different subtypes, or even on specific blocks by entityId)

Definition at line 32 of file IMyTerminalControls.cs.


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