Class Slider
Assembly: PopcorningGuineaPig.Engine.dll
Syntax
public class Slider : InteractiveUIElement, IUIElement
Constructors
|
Edit this page
View Source
Slider(Vector2, Vector2, float, float, float, float)
Declaration
public Slider(Vector2 position, Vector2 size, float minValue, float maxValue, float initialValue = -3.4028235E+38, float step = 0.01)
Parameters
Properties
|
Edit this page
View Source
Value
Declaration
public float Value { get; set; }
Property Value
Methods
|
Edit this page
View Source
DrawSelf()
Override DrawSelf to handle label drawing
Derived classes should call base.DrawSelf() to ensure labels are drawn
Declaration
protected override void DrawSelf()
Overrides
|
Edit this page
View Source
GetValue()
Declaration
Returns
|
Edit this page
View Source
GetValueAsPercentage()
Declaration
public float GetValueAsPercentage()
Returns
|
Edit this page
View Source
SetColors(Color, Color, Color)
Declaration
public void SetColors(Color trackColor, Color handleColor, Color activeHandleColor)
Parameters
| Type |
Name |
Description |
| Color |
trackColor |
|
| Color |
handleColor |
|
| Color |
activeHandleColor |
|
|
Edit this page
View Source
SetOnValueChanged(Action<float>)
Declaration
public void SetOnValueChanged(Action<float> callback)
Parameters
|
Edit this page
View Source
SetValue(float)
Declaration
public void SetValue(float value)
Parameters
| Type |
Name |
Description |
| float |
value |
|
|
Edit this page
View Source
SetValueLabel(bool, string, bool)
Declaration
public void SetValueLabel(bool show, string format = "{0:0}%", bool useActual = false)
Parameters
|
Edit this page
View Source
UpdateSelf()
Override UpdateSelf to provide common interactive element functionality
Derived classes should call base.UpdateSelf() before their own update logic
Declaration
protected override void UpdateSelf()
Overrides
Implements