Class GradientPicker
Custom MonoBehaviour for the GradientPicker
Inheritance
System.Object
GradientPicker
Namespace: Jotunn.GUI
Assembly: Jotunn.dll
Syntax
public class GradientPicker : MonoBehaviour
Fields
| Improve this Doc View Sourcedone
True when the GradientPicker is closed
Declaration
public static bool done
Field Value
Type | Description |
---|---|
System.Boolean |
Methods
| Improve this Doc View SourceCancel()
Manually cancel the GradientPicker and recovers the default value
Declaration
public static void Cancel()
CCancel()
Cancel button call
Declaration
public void CCancel()
CDone()
Done button call
Declaration
public void CDone()
CheckDeleteKey(Slider)
Checks if Key can be deleted
Declaration
public void CheckDeleteKey(Slider s)
Parameters
Type | Name | Description |
---|---|---|
Slider | s |
ChooseColor()
Choose color button call
Declaration
public void ChooseColor()
Create(Gradient, String, GradientPicker.GradientEvent, GradientPicker.GradientEvent)
Creates a new GradiantPicker
Declaration
public static bool Create(Gradient original, string message, GradientPicker.GradientEvent onGradientChanged, GradientPicker.GradientEvent onGradientSelected)
Parameters
Type | Name | Description |
---|---|---|
Gradient | original | Color before editing |
System.String | message | Display message |
GradientPicker.GradientEvent | onGradientChanged | Event that gets called when the gradient gets modified |
GradientPicker.GradientEvent | onGradientSelected | Event that gets called when one of the buttons done or cancel gets pressed |
Returns
Type | Description |
---|---|
System.Boolean | False if the instance is already running |
CreateNewAlphaKey(Single)
Checks if new AlphaKey should be created
Declaration
public void CreateNewAlphaKey(float time)
Parameters
Type | Name | Description |
---|---|---|
System.Single | time |
CreateNewColorKey(Single)
Checks if new ColorKey should be created
Declaration
public void CreateNewColorKey(float time)
Parameters
Type | Name | Description |
---|---|---|
System.Single | time |
Done()
Manually close the GradientPicker and apply the selected color
Declaration
public static void Done()
Select()
Changes Selected Key
Declaration
public void Select()
SetAlpha(Single)
Accessed by alpha Slider
Declaration
public void SetAlpha(float value)
Parameters
Type | Name | Description |
---|---|---|
System.Single | value |
SetAlpha(String)
Accessed by alpha InputField
Declaration
public void SetAlpha(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value |
SetTime(Single)
Accessed by position Slider
Declaration
public void SetTime(float time)
Parameters
Type | Name | Description |
---|---|---|
System.Single | time |
SetTime(String)
Accessed by position InputField
Declaration
public void SetTime(string time)
Parameters
Type | Name | Description |
---|---|---|
System.String | time |