Show / Hide Table of Contents

Class ColorPicker

Custom MonoBehaviour for the ColorPicker
Inheritance
System.Object
ColorPicker
Namespace: Jotunn.GUI
Assembly: Jotunn.dll
Syntax
public class ColorPicker : MonoBehaviour

Fields

| Improve this Doc View Source

aComponent

Component ref
Declaration
public Slider aComponent
Field Value
Type Description
Slider
| Improve this Doc View Source

bComponent

Component ref
Declaration
public Slider bComponent
Field Value
Type Description
Slider
| Improve this Doc View Source

colorComponent

Component ref
Declaration
public RawImage colorComponent
Field Value
Type Description
RawImage
| Improve this Doc View Source

done

Declaration
public static bool done
Field Value
Type Description
System.Boolean True when the ColorPicker is closed
| Improve this Doc View Source

gComponent

Component ref
Declaration
public Slider gComponent
Field Value
Type Description
Slider
| Improve this Doc View Source

hexaComponent

Component ref
Declaration
public InputField hexaComponent
Field Value
Type Description
InputField
| Improve this Doc View Source

mainComponent

Component ref
Declaration
public Slider mainComponent
Field Value
Type Description
Slider
| Improve this Doc View Source

positionIndicator

Component ref
Declaration
public RectTransform positionIndicator
Field Value
Type Description
RectTransform
| Improve this Doc View Source

rComponent

Component ref
Declaration
public Slider rComponent
Field Value
Type Description
Slider

Methods

| Improve this Doc View Source

Cancel()

Manually cancel the ColorPicker and recover the default value
Declaration
public static void Cancel()
| Improve this Doc View Source

CCancel()

Cancel button call
Declaration
public void CCancel()
| Improve this Doc View Source

CDone()

Done button call
Declaration
public void CDone()
| Improve this Doc View Source

Create(Color, String, ColorPicker.ColorEvent, ColorPicker.ColorEvent, Boolean)

Creates a new Colorpicker
Declaration
public static bool Create(Color original, string message, ColorPicker.ColorEvent onColorChanged, ColorPicker.ColorEvent onColorSelected, bool useAlpha = false)
Parameters
Type Name Description
Color original Color before editing
System.String message Display message
ColorPicker.ColorEvent onColorChanged Event that gets called when the color gets modified
ColorPicker.ColorEvent onColorSelected Event that gets called when one of the buttons done or cancel get pressed
System.Boolean useAlpha When set to false the colors used don't have an alpha channel
Returns
Type Description
System.Boolean False if the instance is already running
| Improve this Doc View Source

Done()

Manually close the ColorPicker and apply the selected color
Declaration
public static void Done()
| Improve this Doc View Source

SetA(Single)

Gets a Slider value
Declaration
public void SetA(float value)
Parameters
Type Name Description
System.Single value
| Improve this Doc View Source

SetA(String)

Gets a InputField value
Declaration
public void SetA(string value)
Parameters
Type Name Description
System.String value
| Improve this Doc View Source

SetB(Single)

Gets b Slider value
Declaration
public void SetB(float value)
Parameters
Type Name Description
System.Single value
| Improve this Doc View Source

SetB(String)

Gets b InputField value
Declaration
public void SetB(string value)
Parameters
Type Name Description
System.String value
| Improve this Doc View Source

SetChooser()

Used by EventTrigger to calculate the chosen value in color box
Declaration
public void SetChooser()
| Improve this Doc View Source

SetG(Single)

Gets g Slider value
Declaration
public void SetG(float value)
Parameters
Type Name Description
System.Single value
| Improve this Doc View Source

SetG(String)

Gets g InputField value
Declaration
public void SetG(string value)
Parameters
Type Name Description
System.String value
| Improve this Doc View Source

SetHexa(String)

Gets hexa InputField value
Declaration
public void SetHexa(string value)
Parameters
Type Name Description
System.String value
| Improve this Doc View Source

SetMain(Single)

Gets main Slider value
Declaration
public void SetMain(float value)
Parameters
Type Name Description
System.Single value
| Improve this Doc View Source

SetR(Single)

Gets r Slider value
Declaration
public void SetR(float value)
Parameters
Type Name Description
System.Single value
| Improve this Doc View Source

SetR(String)

Gets r InputField value
Declaration
public void SetR(string value)
Parameters
Type Name Description
System.String value

Extension Methods

PrefabExtension.FixReferences(Object)
  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾