Class UISetting_Slider
UISetting subclass representing a setting that has a float or integer value with a lower and upper limit so that it can be set using a slider.
Namespace: AS2.UI
Assembly: .dll
Syntax
public class UISetting_Slider : UISetting
Constructors
| Edit this page View SourceUISetting_Slider(GameObject, Transform, string, float, float, float, bool)
Declaration
public UISetting_Slider(GameObject go, Transform parentTransform, string name, float minValue, float maxValue, float value, bool wholeNumbers)
Parameters
Type | Name | Description |
---|---|---|
GameObject | go | |
Transform | parentTransform | |
string | name | |
float | minValue | |
float | maxValue | |
float | value | |
bool | wholeNumbers |
Fields
| Edit this page View SourceonValueChangedEvent
Declaration
public Action<string, float> onValueChangedEvent
Field Value
Type | Description |
---|---|
Action<string, float> |
slider
Declaration
private Slider slider
Field Value
Type | Description |
---|---|
Slider |
Methods
| Edit this page View SourceClearRefs()
Clears all subclass-specific callback events.
Declaration
protected override void ClearRefs()
Overrides
| Edit this page View SourceGetSlider()
Declaration
public Slider GetSlider()
Returns
Type | Description |
---|---|
Slider |
GetValueString()
Access to the current value.
Declaration
public override string GetValueString()
Returns
Type | Description |
---|---|
string | The current value of the setting as a string. |
Overrides
| Edit this page View SourceLockSetting()
Locks the setting to prevent changes.
Declaration
protected override void LockSetting()
Overrides
| Edit this page View SourceOnValueChanged()
Declaration
private void OnValueChanged()
SetInteractableState(bool)
Sets the setting's interactable state.
Declaration
protected override void SetInteractableState(bool interactable)
Parameters
Type | Name | Description |
---|---|---|
bool | interactable | The new interactable state. |
Overrides
| Edit this page View SourceSetValueString(string)
The inverse of GetValueString(). If calling both methods after each other, nothing should change.
Declaration
public override void SetValueString(string input)
Parameters
Type | Name | Description |
---|---|---|
string | input | String representation of the setting's new value. |
Overrides
| Edit this page View SourceUnlockSetting()
Unlocks the setting to allow changes again after locking.
Declaration
protected override void UnlockSetting()
Overrides
| Edit this page View SourceUpdateValue(float)
Declaration
public void UpdateValue(float value)
Parameters
Type | Name | Description |
---|---|---|
float | value |