Class UISetting_Color
UISetting subclass for setting a color.
Colors are represented in RGB format, either as
integers from 0 to 255 or as floats from 0 to 1.
Inheritance
UISetting_Color
Namespace: AS2.UI
Assembly: .dll
Syntax
public class UISetting_Color : UISetting
Constructors
Declaration
public UISetting_Color(GameObject go, Transform parentTransform, string name, Color start, UISetting_Color.InputType inputType)
Parameters
Fields
color
Declaration
Field Value
Declaration
private TMP_InputField inputB
Field Value
Type |
Description |
TMP_InputField |
|
Declaration
private string inputBprev
Field Value
Declaration
private TMP_InputField inputG
Field Value
Type |
Description |
TMP_InputField |
|
Declaration
private string inputGprev
Field Value
Declaration
private TMP_InputField inputR
Field Value
Type |
Description |
TMP_InputField |
|
Declaration
private string inputRprev
Field Value
Declaration
private UISetting_Color.InputType inputType
Field Value
onValueChangedEvent
Declaration
public Action<string, string> onValueChangedEvent
Field Value
Properties
Color
Declaration
public Color Color { get; }
Property Value
Methods
ClearRefs()
Clears all subclass-specific callback events.
Declaration
protected override void ClearRefs()
Overrides
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
Declaration
protected bool IsInputValid(string input, out int intVal, out float floatVal)
Parameters
Returns
LockSetting()
Locks the setting to prevent changes.
Declaration
protected override void LockSetting()
Overrides
OnValueChanged()
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
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
UnlockSetting()
Unlocks the setting to allow changes again after locking.
Declaration
protected override void UnlockSetting()
Overrides
UpdateValue(Color)
Declaration
public void UpdateValue(Color newColor)
Parameters
Type |
Name |
Description |
Color |
newColor |
|