Vertices Engine  v1.9.2.92
A Cross Platform game engine developed by Virtex Edge Design.
Loading...
Searching...
No Matches
VerticesEngine.UI.Controls.vxSlider Class Reference

Basic Button GUI Control. More...

Inheritance diagram for VerticesEngine.UI.Controls.vxSlider:
VerticesEngine.UI.vxUIControl

Public Member Functions

 vxSlider (float Min, float Max, float Value, Vector2 position)
 
 vxSlider (float Min, float Max, float Value, Vector2 position, int SliderLength)
 Initializes a new instance of the T:VerticesEngine.UI.Controls.vxSlider class.
 
override void Draw ()
 Draws the GUI Item.
 
- Public Member Functions inherited from VerticesEngine.UI.vxUIControl
virtual Type GetBaseGuiType ()
 A string that is set in the base class of many items.
 
int GetScaledSize (float i)
 Scales an Integer by the Screen Scaler Size. This is used to keep GUI and Item Sizes consistent across different Screen Sizes and Resolutions.
 
virtual void OnLocalizationChanged ()
 
void SetLocalisedText (string key, string postface="")
 
virtual string FilterTextInput (string input)
 
virtual void OnTextChanged ()
 Called on text change.
 
virtual void OnFontSet ()
 
virtual void OnShadowStatusChange ()
 Called when ever the DoShadow Property is changed. Override to change values for child elements.
 
virtual void OnItemPositionChange ()
 
virtual void ResetLayout ()
 
 vxUIControl ()
 Initializes a new instance of the VerticesEngine.UI.vxUIControl class.
 
 vxUIControl (Vector2 position)
 Initializes a new instance of the VerticesEngine.UI.vxUIControl class.
 
void Dispose ()
 Call this to dispose the UI control. This should only be called by the vxUIManager or the vxCanvas
 
virtual void NotHover ()
 When the Mouse is NOT over the GUIItem.
 
virtual void Hover ()
 When the Mouse is over the GUIItem.
 
virtual void Select ()
 When the GUIItem is Selected.
 
virtual void OnGUIManagerAdded (vxUIManager UIManager)
 
virtual void OnLayoutInvalidated ()
 This is called whenever the layout is changed, content changed, or any method has been called which requires the control to be re-layedout.
 
virtual void PlaySound (SoundEffect SoundEffect, float Volume=1, float Pitch=0)
 Plays the speciefied Sound Effect. Note this is to encapsulate the Sound Playing in one place around a try-catch block. Although this is not the ideal way of doing it, it allows for better cross-platform support since different platforms, namely mobile, have different maximums of letting sound effects play at the same time.
 
void UpdateUI ()
 
Color GetStateColour (vxColourTheme theme)
 
virtual void DrawText ()
 Draws the GUI Items text. This is kept seperate for effiecency when using Sprite Sheets.
 
void SetToolTip (string ToolTipText)
 
virtual void DrawToolTip ()
 If Possible, will draw the Tool Tip.
 
virtual void DrawBorder ()
 
Vector2 GetCenteredTextPosition (SpriteFont font, string text)
 Gets the centered text position.
 
void DrawDebugPoint (Vector2 Pos)
 Draws the debug point.
 
void DrawDebugPoint (Vector2 Pos, Color color)
 Draws the debug point.
 
bool TryConvertKeyboardInput (KeyboardState keyboard, KeyboardState oldKeyboard, out char key)
 Tries to convert keyboard input to characters and prevents repeatedly returning the same character if a key was pressed last frame, but not yet unpressed this frame.
 

Public Attributes

float Min = 0
 The Minimum Value of the Slider.
 
float Max = 1
 The Maximum Value of the Slider.
 
float Value = 0.5f
 The Value of the Slider.
 
int TotalWidth = 150
 The total width.
 
int TotalHeight = 4
 The total height.
 
Rectangle MarkerRec
 The marker rec.
 
Vector2 SliderPosition = Vector2.Zero
 The slider position.
 
float Tick = 0.01f
 The Incremental value that the Slider can be set to.
 
- Public Attributes inherited from VerticesEngine.UI.vxUIControl
float PositionDifference = 0
 
object UserData
 Object variable which allows arbitary data too be passed between methods.
 
vxUIManager UIManager
 The owning GUI Manger.
 
vxUIControlTheme Theme = vxUIControlTheme.GetDefault()
 The item theme.
 
bool IsVisible = true
 Gets or sets a value indicating whether this instance is visible.
 
string Name = "<name>"
 Name Of GUI Item to help Identify it, not to be confused with Text.
 
string LocalisationKey
 
string PreviousText = ""
 
Vector2 TextSize = new Vector2()
 
float Opacity = 1
 Gets or sets the opacity of the current GUI Item.
 
float TransitionAlpha = 1
 A transition Alpha which can be controled by an owning control such as a Dialog or Message Box.
 
bool DoSelectionBorder = true
 Do selection border.
 
bool DoBorder = false
 Gets or sets the opacity of the current GUI Item.
 
int BorderSize = 1
 The size of the border.
 
Vector2 ShadowOffset = new Vector2(5, 5)
 The shadow offset.
 
float ShadowTransparency = 0.5f
 The shadow transparency.
 
Color ShadowColour = Color.Black
 The shadow colour.
 
bool ToggleState
 Toggle State of the GUI Item. Note: IsTogglable must be set too true.
 
float Alpha = 1
 Gets or sets the alpha of the GUI Item.
 
float HoverAlpha = 0
 Gets or sets the hover alpha.
 
float HoverAlphaReq = 0
 Gets or sets the requested hover alpha for smoothing.
 
float HoverAlphaMax = 1
 Gets or sets the hover alpha max.
 
float HoverAlphaMin = 0
 Gets or sets the hover alpha minimum.
 
float HoverAlphaDeltaSpeed = 4
 Gets or sets the hover alpha delta speed of smoothing.
 
Vector2 OriginalPosition = Vector2.Zero
 Position Of GUI Item.
 
Vector2 Padding = new Vector2(5)
 Padding Of GUI Item.
 
bool IsFullWidth = false
 
bool IsFullHeight = false
 
Rectangle BorderBounds = Rectangle.Empty
 The border bounds of the gui item.
 
Color BorderColour = Color.Black
 The border colour.
 
Vector4 BoundingRectangleMargins = new Vector4(0)
 
int Index = 0
 Element Index.
 
int GUIIndex = 0
 The index in the gui system.
 
ScreenState ScreenState = ScreenState.TransitionOn
 
bool DisableTouchSelectOnScroll = false
 This bool holds a value of whether or not Select should be disabled if the item is moved a certain distance in between 'TouchLocationState.Pressed' and 'TouchLocationState.Released'. The threshold distance is 'DisableScrollThreshold'.
 
float DisableScrollThreshold = 5
 The disable scroll threshold. This is only used if 'DisableTouchSelectOnScroll' is true.
 
vxEnumClickType ClickType = vxEnumClickType.OnPress
 
bool IsUpdateable = true
 Is this item Updatable.
 
string ToolTipText = ""
 
bool IsToolTipEnabled = false
 Are Tooltips Enabled for this GUI Item.
 
int ToolTipeCount = 0
 
int ToolTipMax = 15
 The amount of update calls with this item recieving focus before it'll show the Tool Tip if it's Enabled.
 
float ToolTipAlpha = 0
 

Protected Member Functions

virtual void OnValueChange (float newValue, float previousValue)
 
- Protected Member Functions inherited from VerticesEngine.UI.vxUIControl
void Click ()
 Forces a click event.
 
virtual void OnEnableStateChanged ()
 Called when the elabled state changes.
 
virtual void OnDisposed ()
 Called when this UI control is disposed.
 

Events

EventHandler< vxValueChangedEventArgsValueChanged
 Occurs when the value changes.
 
- Events inherited from VerticesEngine.UI.vxUIControl
EventHandler< vxUIControlClickEventArgsClicked
 Event Raised when the item is clicked.
 
EventHandler< vxUIControlClickEventArgsDoubleClicked
 Occurs when double clicked.
 
EventHandler< vxUIManagerItemAddEventArgsAddedToGUIManager
 Event Raised when this item is added to a GUI Manager.
 
EventHandler< EventArgs > OnInitialHover
 Event Raised when the Mouse First Begins too Hover over this item.
 
EventHandler< EventArgs > EnabledStateChanged
 Occurs when enabled state changed.
 
EventHandler< EventArgs > PositionChanged
 Event raised when Item Position is Changed.
 
EventHandler< EventArgs > ItemOreintationChanged
 Event Raised when Item Orientation is Changed.
 

Additional Inherited Members

- Properties inherited from VerticesEngine.UI.vxUIControl
GraphicsDevice GraphicsDevice [get]
 
Viewport Viewport [get]
 
float GetScalerAvg [get]
 
vxEnumGUIElementState State [get]
 Gets the state.
 
vxSpriteBatch SpriteBatch [get]
 Gets the sprite batch.
 
Texture2D DefaultTexture [get]
 Gets the default texture.
 
string Text [get, set]
 Text Of GUI Item.
 
SpriteFont Font [get, set]
 Text Of GUI Item.
 
bool IsShadowVisible [get, set]
 Should the image draw a shadow.
 
bool HasFocus [get, set]
 Gets or sets a value indicating whether this instance has focus.
 
bool CaptureInput [get, set]
 Gets or sets a value indicating whether this instance has focus.
 
bool IsTogglable [get, set]
 Is the Item a Toggleable?
 
bool IsSelected [get, set]
 Returns Whether or not the item is Selected.
 
bool IsEnabled [get, set]
 Returns Whether or not the item is Enabled.
 
Vector2 Position [get, set]
 Position Of GUI Item.
 
int Width [get, set]
 Width Of GUI Item.
 
int Height [get, set]
 Width Of GUI Item.
 
Rectangle Bounds [get, set]
 Bounding Rectangle Of GUI Item.
 
vxUIItemOrientation ItemOrientation [get, set]
 GUI Item Orientation.
 
bool IsOrientationHorizontal [get]
 
MouseState PreviousMouseState [get]
 Previous Mouse State.
 
bool HasMouseBeenUpYet [get, set]
 Gets a value indicating whether the mouse left button been up yet.
 

Detailed Description

Basic Button GUI Control.

Constructor & Destructor Documentation

◆ vxSlider()

VerticesEngine.UI.Controls.vxSlider.vxSlider ( float Min,
float Max,
float Value,
Vector2 position,
int SliderLength )

Initializes a new instance of the T:VerticesEngine.UI.Controls.vxSlider class.

Parameters
EngineThe Vertices Engine Reference.
MinMinimum.
MaxMax.
ValueValue.
positionThis Items Start Position. Note that the 'OriginalPosition' variable will be set to this value as well.

Member Function Documentation

◆ Draw()

override void VerticesEngine.UI.Controls.vxSlider.Draw ( )
virtual

Draws the GUI Item.

Reimplemented from VerticesEngine.UI.vxUIControl.


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