Class UISetting_ValueSlider
UISetting subclass for settings that have a range of values
and should be selectable by a slider. The values can be float or integer
numbers or a list of strings for which the slider selects the index.
Inheritance
object
UISetting_ValueSlider
Namespace: AS2.UI
Assembly: .dll
Syntax
public class UISetting_ValueSlider : UISetting
Constructors
|
Edit this page
View Source
Declaration
public UISetting_ValueSlider(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 |
|
|
Edit this page
View Source
Declaration
public UISetting_ValueSlider(GameObject go, Transform parentTransform, string name, string[] values, float initialIndex)
Parameters
Type |
Name |
Description |
GameObject |
go |
|
Transform |
parentTransform |
|
string |
name |
|
string[] |
values |
|
float |
initialIndex |
|
Fields
|
Edit this page
View Source
Declaration
private TMP_InputField input
Field Value
Type |
Description |
TMP_InputField |
|
|
Edit this page
View Source
mapping
Declaration
Field Value
Type |
Description |
string[] |
|
|
Edit this page
View Source
mappingActive
Declaration
private bool mappingActive
Field Value
|
Edit this page
View Source
onValueChangedEvent
Declaration
public Action<string, float> onValueChangedEvent
Field Value
Type |
Description |
Action<string, float> |
|
|
Edit this page
View Source
onValueChangedEventString
Declaration
public Action<string, string> onValueChangedEventString
Field Value
Type |
Description |
Action<string, string> |
|
|
Edit this page
View Source
slider
Declaration
Field Value
Methods
|
Edit this page
View Source
ClearRefs()
Clears all subclass-specific callback events.
Declaration
protected override void ClearRefs()
Overrides
|
Edit this page
View Source
GetSlider()
Declaration
public Slider GetSlider()
Returns
|
Edit this page
View Source
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 Source
LockSetting()
Locks the setting to prevent changes.
Declaration
protected override void LockSetting()
Overrides
|
Edit this page
View Source
OnValueChanged()
Declaration
private void OnValueChanged()
|
Edit this page
View Source
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 Source
SetValueString(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 Source
UnlockSetting()
Unlocks the setting to allow changes again after locking.
Declaration
protected override void UnlockSetting()
Overrides
|
Edit this page
View Source
Declaration
private void UpdateInputField()
|
Edit this page
View Source
UpdateValue(float)
Declaration
public void UpdateValue(float value)
Parameters
Type |
Name |
Description |
float |
value |
|
|
Edit this page
View Source
UpdateValue(string)
Declaration
public void UpdateValue(string text)
Parameters
Type |
Name |
Description |
string |
text |
|