Class ColorSelector
Color selecting control.
Implements
Namespace: FlaxEditor.GUI.Dialogs
Assembly: FlaxEngine.CSharp.dll
Syntax
public class ColorSelector : ContainerControl, IComparable, IDrawable
Constructors
ColorSelector()
ColorSelector(Single)
Initializes a new instance of the ColorSelector class.
Declaration
public ColorSelector(float wheelSize)
Parameters
System.Single
wheelSize
Size of the wheel. |
Fields
_color
_wheelRect
Properties
Color
IsSliding
Gets a value indicating whether user is using a wheel.
Declaration
public bool IsSliding { get; }
Property Value
System.Boolean
|
Methods
Draw()
Draw the control and the children.
Declaration
public override void Draw()
Overrides
OnEndMouseCapture()
When mouse goes up/down not over the control but it has user focus so remove that focus from it (used by scroll bars, sliders etc.)
Declaration
public override void OnEndMouseCapture()
Overrides
OnLostFocus()
When control losts input focus
Declaration
public override void OnLostFocus()
Overrides
OnMouseDown(Float2, MouseButton)
When mouse goes down over control's area
Declaration
public override bool OnMouseDown(Float2 location, MouseButton button)
Parameters
Float2
location
Mouse location in Control Space |
MouseButton
button
Mouse buttons state (flags) |
Returns
System.Boolean
True if event has been handled, otherwise false |
Overrides
OnMouseMove(Float2)
When mouse moves over control's area
Declaration
public override void OnMouseMove(Float2 location)
Parameters
Float2
location
Mouse location in Control Space |
Overrides
OnMouseUp(Float2, MouseButton)
When mouse goes up over control's area
Declaration
public override bool OnMouseUp(Float2 location, MouseButton button)
Parameters
Float2
location
Mouse location in Control Space |
MouseButton
button
Mouse buttons state (flags) |
Returns
System.Boolean
True if event has been handled, otherwise false |
Overrides
OnSizeChanged()
Called when control size gets changed.
Declaration
protected override void OnSizeChanged()
Overrides
UpdateMouse(ref Float2)
Updates the color selected by the mouse.
Declaration
protected virtual void UpdateMouse(ref Float2 location)
Parameters
Float2
location
The location. |
Events
ColorChanged
Occurs when selected color gets changed.
Declaration
public event Action<Color> ColorChanged
Event Type
System.Action<Color>
|
SlidingEnd
Occurs when sliding ends.
Declaration
public event Action SlidingEnd
Event Type
System.Action
|
SlidingStart
Occurs when sliding starts.
Declaration
public event Action SlidingStart
Event Type
System.Action
|