Click or drag to resize
IMyTerminalControls Interface
v01.180.0 (Beta)

[This is preliminary documentation and is subject to change.]

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.

Namespace: Sandbox.ModAPI
Assembly: Sandbox.Common (in Sandbox.Common.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public interface IMyTerminalControls

The IMyTerminalControls type exposes the following members.

Methods
  NameDescription
Public methodAddActionTBlock
This allows you to add an action to an assocated block
Public methodAddControlTBlock
Adds a terminal control to a block.
Public methodCreateActionTBlock
This allows you to create an action to associate with a block
Public methodCreateControlTControl, TBlock
This creates a control that can be added to a block.
Public methodCreatePropertyTValue, TBlock
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.
Public methodGetActionsTBlock
This allows you to get all actions associated with this block.
Public methodGetControlsTBlock
Gets the controls associated with a block.
Public methodRemoveActionTBlock
This allows you to remove an action from a block
Public methodRemoveControlTBlock
Removes a terminal control from a block.
Top
Events
  NameDescription
Public eventCustomActionGetter
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)
Public eventCustomControlGetter
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)
Top
See Also