Class ColorPicker
Inherited Members
Namespace: SadConsole.UI.Controls
Assembly: SadConsole.Extended.dll
Syntax
public class ColorPicker : ControlBase
Constructors
ColorPicker(int, int, Color)
Creates a new panel with the specified width, height, and master color.
Declaration
public ColorPicker(int width, int height, Color color)
Parameters
Properties
MasterColor
The main color being shown that all gradients are generated from.
Declaration
public Color MasterColor { get; set; }
Property Value
Type | Description |
---|---|
Color |
SelectedColor
The color selected by the user. A shade of MasterColor.
Declaration
public Color SelectedColor { get; }
Property Value
Type | Description |
---|---|
Color |
Methods
OnMouseIn(ControlMouseState)
Called as the mouse moves around the control area. Raises the MouseMove event and calls the DetermineState() method.
Declaration
protected override void OnMouseIn(ControlBase.ControlMouseState info)
Parameters
Type | Name | Description |
---|---|---|
ControlBase.ControlMouseState | info |
Overrides
ProcessMouse(MouseScreenObjectState)
Checks if the mouse is the control and calls the appropriate mouse methods.
Declaration
public override bool ProcessMouse(MouseScreenObjectState info)
Parameters
Type | Name | Description |
---|---|---|
MouseScreenObjectState | info |
Returns
Type | Description |
---|---|
bool | True when the control is enabled, set to use the mouse and the mouse is over it, otherwise false. |
Overrides
UpdateAndRedraw(TimeSpan)
Redraws the control if applicable.
Declaration
public override void UpdateAndRedraw(TimeSpan time)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | time | The duration of thecurrent frame. |
Overrides
Events
SelectedColorChanged
Raised when SelectedColor changes value.
Declaration
public event EventHandler? SelectedColorChanged
Event Type
Type | Description |
---|---|
EventHandler |