Class GradientEditor
The color gradient editing control for a timeline media event. Allows to edit the gradients stops to create the linear color animation over time.
Implements
Namespace: FlaxEditor.GUI.Timeline.GUI
Assembly: FlaxEngine.CSharp.dll
Syntax
public class GradientEditor : ContainerControl, IComparable, IDrawable
Constructors
GradientEditor()
Properties
Stops
Gets or sets the list of gradient stops.
Declaration
public List<GradientEditor.Stop> Stops { get; set; }
Property Value
System.Collections.Generic.List<GradientEditor.Stop>
|
Methods
AddUpdateCallbacks(RootControl)
Adds the custom control logic update callbacks to the root.
Declaration
protected override void AddUpdateCallbacks(RootControl root)
Parameters
RootControl
root
The root. |
Overrides
Draw()
Draw the control and the children.
Declaration
public override void Draw()
Overrides
OnDestroy()
Method called when managed instance should be destroyed
Declaration
public override void OnDestroy()
Overrides
OnEdited()
Called when stops collection gets modified (stop value or time modified).
Declaration
protected virtual void OnEdited()
OnEditingEnd()
Called when gradient data editing ends (via UI).
Declaration
public void OnEditingEnd()
OnEditingStart()
Called when gradient data editing starts (via UI).
Declaration
public void OnEditingStart()
OnMouseDoubleClick(Float2, MouseButton)
When mouse double clicks over control's area
Declaration
public override bool OnMouseDoubleClick(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
OnStopsChanged()
Called when stops collection gets changed (added/removed).
Declaration
protected virtual void OnStopsChanged()
OnTimelineFpsChanged(Single, Single)
Called when timeline FPS gets changed.
Declaration
public void OnTimelineFpsChanged(float before, float after)
Parameters
System.Single
before
The before value. |
System.Single
after
The after value. |
RemoveUpdateCallbacks(RootControl)
Removes the custom control logic update callbacks from the root.
Declaration
protected override void RemoveUpdateCallbacks(RootControl root)
Parameters
RootControl
root
The root. |
Overrides
SetScale(Single)
Sets the scale factor (used to convert the gradient stops frame into control pixels).
Declaration
public void SetScale(float scale)
Parameters
System.Single
scale
The scale. |
Events
Edited
Occurs when stops collection gets modified (stop value or time modified).
Declaration
public event Action Edited
Event Type
System.Action
|
EditingEnd
Occurs when gradient data editing ends (via UI).
Declaration
public event Action EditingEnd
Event Type
System.Action
|
EditingStart
Occurs when gradient data editing starts (via UI).
Declaration
public event Action EditingStart
Event Type
System.Action
|
StopsChanged
Occurs when stops collection gets changed (added/removed).
Declaration
public event Action StopsChanged
Event Type
System.Action
|