Space Engineers
Public Member Functions | Public Attributes | Protected Member Functions | Properties | List of all members
Sandbox.Graphics.GUI.MyGuiControlSlider Class Reference
Inheritance diagram for Sandbox.Graphics.GUI.MyGuiControlSlider:
Sandbox.Graphics.GUI.MyGuiControlSliderBase Sandbox.Graphics.GUI.MyGuiControlBase Sandbox.Graphics.GUI.IMyGuiControlsOwner

Public Member Functions

 MyGuiControlSlider (Vector2?position=null, float minValue=0f, float maxValue=1f, float width=464f/1600f, float?defaultValue=null, Vector4?color=null, String labelText=null, int labelDecimalPlaces=1, float labelScale=MyGuiConstants.DEFAULT_TEXT_SCALE, float labelSpaceWidth=0f, string labelFont=MyFontEnum.White, String toolTip=null, MyGuiControlSliderStyleEnum visualStyle=MyGuiControlSliderStyleEnum.Default, MyGuiDrawAlignEnum originAlign=MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER, bool intValue=false)
 
void SetBounds (float minValue, float maxValue)
 
- Public Member Functions inherited from Sandbox.Graphics.GUI.MyGuiControlSliderBase
 MyGuiControlSliderBase (Vector2?position=null, float width=464f/1600f, MyGuiSliderProperties props=null, float?defaultRatio=null, Vector4?color=null, float labelScale=MyGuiConstants.DEFAULT_TEXT_SCALE, float labelSpaceWidth=0f, string labelFont=MyFontEnum.White, String toolTip=null, MyGuiControlSliderStyleEnum visualStyle=MyGuiControlSliderStyleEnum.Default, MyGuiDrawAlignEnum originAlign=MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER)
 
override void OnRemoving ()
 Removes various references and clears event handlers. More...
 
override MyGuiControlBase HandleInput ()
 Method returns true if input was captured by control, so no other controls, nor screen can use input in this update. More...
 
override void Draw (float transitionAlpha, float backgroundTransitionAlpha)
 
void ApplyStyle (StyleDefinition style)
 
- Public Member Functions inherited from Sandbox.Graphics.GUI.MyGuiControlBase
virtual void Init (MyObjectBuilder_GuiControlBase builder)
 
virtual MyObjectBuilder_GuiControlBase GetObjectBuilder ()
 
virtual MyGuiControlGridDragAndDrop GetDragAndDropHandlingNow ()
 
virtual MyGuiControlBase GetExclusiveInputHandler ()
 
virtual MyGuiControlBase GetMouseOverControl ()
 Returns first control, which has mouse over. More...
 
virtual void HideToolTip ()
 
virtual bool IsMouseOverAnyControl ()
 
virtual void ShowToolTip ()
 
virtual void Update ()
 
virtual bool CheckMouseOver ()
 Checks if mouse cursor is over control. GR: Update: Also check if mouse over parent controls. Slower but more solid implementation (and we get rid of a few bugs). Also there is no need for HandleMouse variable (removed) More...
 
virtual string GetMouseCursorTexture ()
 
Vector2 GetPositionAbsolute ()
 
Vector2 GetPositionAbsoluteBottomLeft ()
 
Vector2 GetPositionAbsoluteBottomRight ()
 
Vector2 GetPositionAbsoluteCenterLeft ()
 
Vector2 GetPositionAbsoluteCenter ()
 
Vector2 GetPositionAbsoluteTopLeft ()
 
Vector2 GetPositionAbsoluteTopRight ()
 
Vector2 GetSize ()
 
void SetToolTip (MyToolTips toolTip)
 
void SetToolTip (String text)
 
void SetToolTip (MyStringId text)
 
void GetElementsUnderCursor (Vector2 position, bool visibleOnly, List< MyGuiControlBase > controls)
 
virtual MyGuiControlBase GetNextFocusControl (MyGuiControlBase currentFocusControl, bool forwardMovement)
 
virtual void Clear ()
 
override string ToString ()
 

Public Attributes

new Action< MyGuiControlSliderValueChanged
 
new Func< MyGuiControlSlider, bool > SliderClicked
 
- Public Attributes inherited from Sandbox.Graphics.GUI.MyGuiControlSliderBase
Action< MyGuiControlSliderBaseValueChanged
 
float DefaultRatio
 
Func< MyGuiControlSliderBase, bool > SliderClicked
 
- Public Attributes inherited from Sandbox.Graphics.GUI.MyGuiControlBase
readonly MyGuiControls Elements
 
MyGuiCompositeTexture BackgroundTexture
 
Vector4 BorderColor
 
bool BorderEnabled
 
bool DrawWhilePaused
 
bool ShowTooltipWhenDisabled
 
bool IsActiveControl
 There are some controls, that cannot receive any handle input(control panel for example), thus disable them with this. More...
 
MyGuiControlHighlightType HighlightType
 

Protected Member Functions

override void OnValueChange ()
 
override bool OnSliderClicked ()
 
- Protected Member Functions inherited from Sandbox.Graphics.GUI.MyGuiControlSliderBase
override void OnSizeChanged ()
 
override void OnHasHighlightChanged ()
 
- Protected Member Functions inherited from Sandbox.Graphics.GUI.MyGuiControlBase
 MyGuiControlBase (Vector2?position=null, Vector2?size=null, Vector4?colorMask=null, String toolTip=null, MyGuiCompositeTexture backgroundTexture=null, bool isActiveControl=true, bool canHaveFocus=false, bool allowFocusingElements=false, MyGuiControlHighlightType highlightType=MyGuiControlHighlightType.WHEN_ACTIVE, MyGuiDrawAlignEnum originAlign=MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER)
 
void DrawBackground (float transitionAlpha)
 
void DrawBorder (float transitionAlpha)
 
virtual bool ShouldHaveHighlight ()
 
virtual void OnPositionChanged ()
 
virtual void OnVisibleChanged ()
 
virtual void OnOriginAlignChanged ()
 
virtual void OnEnabledChanged ()
 
virtual void OnColorMaskChanged ()
 
MyGuiScreenBase GetTopMostOwnerScreen ()
 
bool IsMouseOverOrKeyboardActive ()
 
virtual void DrawElements (float transitionAlpha, float backgroundTransitionAlpha)
 
MyGuiControlBase HandleInputElements ()
 
virtual void ClearEvents ()
 

Properties

int LabelDecimalPlaces [get, set]
 
float ValueNormalized [get]
 Normalized value selected on slider (range 0, 1). More...
 
float DefaultValue [get, set]
 
float MinValue [get, set]
 
float MaxValue [get, set]
 
bool IntValue [get, set]
 
- Properties inherited from Sandbox.Graphics.GUI.MyGuiControlSliderBase
MyGuiControlSliderStyleEnum VisualStyle [get, set]
 
MyGuiSliderProperties Propeties [get, set]
 
float Ratio [get, set]
 This is values selected on slider in original units, e.g. meters, so it can be for example 1000 meters. More...
 
float DebugScale [get, set]
 
float Value [get, set]
 
- Properties inherited from Sandbox.Graphics.GUI.MyGuiControlBase
float Alpha [get, set]
 
string Name [get, set]
 
IMyGuiControlsOwner Owner [get]
 
MyToolTips Tooltips [get]
 
Vector2 Position [get, set]
 Position of control's center (normalized and relative to parent screen center (not left/top corner!!!)) More...
 
float PositionY [get, set]
 
float PositionX [get, set]
 
Vector2 Size [get, set]
 Size of control (normalized). More...
 
Vector2 MinSize [get, protected set]
 
Vector2 MaxSize [get, protected set]
 
Vector4 ColorMask [get, set]
 
int BorderSize [get, set]
 
bool Enabled [get, set]
 False to disable control, disabled controls are skipped when switching with Tab key etc., look implemented atm. only in MyGuiControlButton. More...
 
MyGuiDrawAlignEnum OriginAlign [get, set]
 
bool Visible [get, set]
 Says whether control is visible. Note that this is not a constant time operation (checks parents, fires events on set). More...
 
bool HasHighlight [get]
 Says whether control is currently highlighted. When control is highlit depends on HighlightType. More...
 
bool HasFocus [get]
 
bool IsMouseOver [get, set]
 
bool CanHaveFocus [get, set]
 
bool AllowFocusingElements [get, set]
 Indicates whether elements can have focus or not. More...
 
object UserData [get, set]
 Specific user data for this control. More...
 
string DebugNamePath [get]
 
- Properties inherited from Sandbox.Graphics.GUI.IMyGuiControlsOwner
string DebugNamePath [get]
 
string Name [get]
 
IMyGuiControlsOwner Owner [get]
 

Additional Inherited Members

- Static Public Member Functions inherited from Sandbox.Graphics.GUI.MyGuiControlSliderBase
static StyleDefinition GetVisualStyle (MyGuiControlSliderStyleEnum style)
 
- Static Public Member Functions inherited from Sandbox.Graphics.GUI.MyGuiControlBase
static void ReadIfHasValue< T > (ref T target, T?source)
 
static void ReadIfHasValue (ref Color target, Vector4?source)
 
static MyGuiControlBase GetExclusiveInputHandler (MyGuiControls controls)
 
static Color ApplyColorMaskModifiers (Vector4 sourceColorMask, bool enabled, float transitionAlpha)
 Modifies source color mask using transition alpha and color multiplier in case a control is disabled. More...
 
static bool CheckMouseOver (Vector2 size, Vector2 position, MyGuiDrawAlignEnum originAlign)
 
static bool IsPointInside (Vector2 queryPoint, Vector2 size, Vector2 position, MyGuiDrawAlignEnum originAlign)
 
- Protected Attributes inherited from Sandbox.Graphics.GUI.MyGuiControlBase
bool m_mouseButtonPressed = false
 
bool m_showToolTip = false
 
Vector2 m_toolTipPosition
 
- Events inherited from Sandbox.Graphics.GUI.MyGuiControlBase
Action< MyGuiControlBase, NameChangedArgsNameChanged
 
Action< MyGuiControlBaseSizeChanged
 
VisibleChangedDelegate VisibleChanged
 
Action< MyGuiControlBase, bool > FocusChanged
 Called when the control enters or leaves focus. More...
 

Detailed Description

Definition at line 9 of file MyGuiControlSlider.cs.

Constructor & Destructor Documentation

Sandbox.Graphics.GUI.MyGuiControlSlider.MyGuiControlSlider ( Vector2 position = null,
float  minValue = 0f,
float  maxValue = 1f,
float  width = 464f/1600f,
float?  defaultValue = null,
Vector4 color = null,
String  labelText = null,
int  labelDecimalPlaces = 1,
float  labelScale = MyGuiConstants.DEFAULT_TEXT_SCALE,
float  labelSpaceWidth = 0f,
string  labelFont = MyFontEnum.White,
String  toolTip = null,
MyGuiControlSliderStyleEnum  visualStyle = MyGuiControlSliderStyleEnum.Default,
MyGuiDrawAlignEnum  originAlign = MyGuiDrawAlignEnum.HORISONTAL_CENTER_AND_VERTICAL_CENTER,
bool  intValue = false 
)
inline

Definition at line 51 of file MyGuiControlSlider.cs.

Member Function Documentation

override bool Sandbox.Graphics.GUI.MyGuiControlSlider.OnSliderClicked ( )
inlineprotectedvirtual

Reimplemented from Sandbox.Graphics.GUI.MyGuiControlSliderBase.

Definition at line 123 of file MyGuiControlSlider.cs.

override void Sandbox.Graphics.GUI.MyGuiControlSlider.OnValueChange ( )
inlineprotectedvirtual

Reimplemented from Sandbox.Graphics.GUI.MyGuiControlSliderBase.

Definition at line 115 of file MyGuiControlSlider.cs.

void Sandbox.Graphics.GUI.MyGuiControlSlider.SetBounds ( float  minValue,
float  maxValue 
)
inline

Definition at line 102 of file MyGuiControlSlider.cs.

Member Data Documentation

new Func<MyGuiControlSlider, bool> Sandbox.Graphics.GUI.MyGuiControlSlider.SliderClicked

Definition at line 121 of file MyGuiControlSlider.cs.

new Action<MyGuiControlSlider> Sandbox.Graphics.GUI.MyGuiControlSlider.ValueChanged

Definition at line 113 of file MyGuiControlSlider.cs.

Property Documentation

float Sandbox.Graphics.GUI.MyGuiControlSlider.DefaultValue
getset

Definition at line 36 of file MyGuiControlSlider.cs.

bool Sandbox.Graphics.GUI.MyGuiControlSlider.IntValue
getset

Definition at line 158 of file MyGuiControlSlider.cs.

int Sandbox.Graphics.GUI.MyGuiControlSlider.LabelDecimalPlaces
getset

Definition at line 13 of file MyGuiControlSlider.cs.

float Sandbox.Graphics.GUI.MyGuiControlSlider.MaxValue
getset

Definition at line 142 of file MyGuiControlSlider.cs.

float Sandbox.Graphics.GUI.MyGuiControlSlider.MinValue
getset

Definition at line 131 of file MyGuiControlSlider.cs.

float Sandbox.Graphics.GUI.MyGuiControlSlider.ValueNormalized
get

Normalized value selected on slider (range 0, 1).

Definition at line 31 of file MyGuiControlSlider.cs.


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