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

Public Member Functions

delegate void SerializerDelegate (BitStream stream, ref long value)
 
delegate void ComboBoxContentDelegate (TBlock block, ICollection< MyTerminalControlComboBoxItem > comboBoxContent)
 
 MyTerminalControlCombobox (string id, MyStringId title, MyStringId tooltip)
 
void SetSerializerDefault ()
 Sets default serializer which serializes always 8B More...
 
void SetSerializerBit ()
 Serializes values as 0 or 1 More...
 
void SetSerializerRange (int minInclusive, int maxInclusive)
 Sets optimal serizalizer for range of two values (with uniform probability) More...
 
void SetSerializerVariant (bool usesNegativeValues=false)
 Sets variant length serializer, smaller number takes less bytes than larger. More...
 
long GetValue (TBlock block)
 
void SetValue (TBlock block, long value)
 
void Serialize (BitStream stream, MyTerminalBlock block)
 (De)serializes block data. More...
 
- 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
 
ComboBoxContentDelegate ComboBoxContentWithBlock
 
Action< List< MyTerminalControlComboBoxItem > > ComboBoxContent
 
SerializerDelegate Serializer
 
- 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

Func< TBlock, long > Getter [set]
 
Action< TBlock, long > Setter [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.IMyTerminalControlCombobox
Action< List< MyTerminalControlComboBoxItem > > ComboBoxContent [get, set]
 This allows you to set the content of the combo box itself. More...
 
- Properties inherited from Sandbox.ModAPI.Interfaces.Terminal.IMyTerminalValueControl< long >
Func< IMyTerminalBlock, TValue > Getter [get, set]
 This is triggered when the value of the control is required. More...
 
Action< IMyTerminalBlock, TValue > Setter [get, set]
 This is triggered when the value of the control is set by the user. Depending on the control, this may be called a lot. 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 20 of file MyTerminalControlCombobox.cs.

Constructor & Destructor Documentation

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

Definition at line 40 of file MyTerminalControlCombobox.cs.

Member Function Documentation

delegate void Sandbox.Game.Gui.MyTerminalControlCombobox< TBlock >.ComboBoxContentDelegate ( TBlock  block,
ICollection< MyTerminalControlComboBoxItem comboBoxContent 
)
override MyGuiControlBase Sandbox.Game.Gui.MyTerminalControlCombobox< TBlock >.CreateGui ( )
inlineprotectedvirtual

Called when app needs GUI (not on DS)

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

Definition at line 102 of file MyTerminalControlCombobox.cs.

long Sandbox.Game.Gui.MyTerminalControlCombobox< TBlock >.GetValue ( TBlock  block)
inline

Definition at line 115 of file MyTerminalControlCombobox.cs.

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

Called when GUI needs update

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

Definition at line 141 of file MyTerminalControlCombobox.cs.

void Sandbox.Game.Gui.MyTerminalControlCombobox< TBlock >.Serialize ( BitStream  stream,
MyTerminalBlock  block 
)
inline

(De)serializes block data.

Implements Sandbox.Game.Gui.ITerminalControlSync.

Definition at line 286 of file MyTerminalControlCombobox.cs.

delegate void Sandbox.Game.Gui.MyTerminalControlCombobox< TBlock >.SerializerDelegate ( BitStream  stream,
ref long  value 
)
void Sandbox.Game.Gui.MyTerminalControlCombobox< TBlock >.SetSerializerBit ( )
inline

Serializes values as 0 or 1

Definition at line 59 of file MyTerminalControlCombobox.cs.

void Sandbox.Game.Gui.MyTerminalControlCombobox< TBlock >.SetSerializerDefault ( )
inline

Sets default serializer which serializes always 8B

Definition at line 51 of file MyTerminalControlCombobox.cs.

void Sandbox.Game.Gui.MyTerminalControlCombobox< TBlock >.SetSerializerRange ( int  minInclusive,
int  maxInclusive 
)
inline

Sets optimal serizalizer for range of two values (with uniform probability)

Definition at line 71 of file MyTerminalControlCombobox.cs.

void Sandbox.Game.Gui.MyTerminalControlCombobox< TBlock >.SetSerializerVariant ( bool  usesNegativeValues = false)
inline

Sets variant length serializer, smaller number takes less bytes than larger.

Definition at line 87 of file MyTerminalControlCombobox.cs.

void Sandbox.Game.Gui.MyTerminalControlCombobox< TBlock >.SetValue ( TBlock  block,
long  value 
)
inline

Definition at line 120 of file MyTerminalControlCombobox.cs.

Member Data Documentation

Definition at line 34 of file MyTerminalControlCombobox.cs.

Definition at line 33 of file MyTerminalControlCombobox.cs.

Definition at line 38 of file MyTerminalControlCombobox.cs.

Definition at line 27 of file MyTerminalControlCombobox.cs.

Definition at line 28 of file MyTerminalControlCombobox.cs.

Property Documentation

Func<TBlock, long> Sandbox.Game.Gui.MyTerminalControlCombobox< TBlock >.Getter
set

Definition at line 35 of file MyTerminalControlCombobox.cs.

Action<TBlock, long> Sandbox.Game.Gui.MyTerminalControlCombobox< TBlock >.Setter
set

Definition at line 36 of file MyTerminalControlCombobox.cs.


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