Class HueBar
Displays the color hues on a bar.
Inherited Members
Namespace: SadConsole.UI.Controls
Assembly: SadConsole.Extended.dll
Syntax
public class HueBar : ControlBase
Constructors
HueBar(int)
Creates a new hue bar control.
Declaration
public HueBar(int width)
Parameters
| Type | Name | Description |
|---|---|---|
| int | width | The width of the bar. |
Fields
_positions
Internal use by theme.
Declaration
public int _positions
Field Value
| Type | Description |
|---|---|
| int |
Properties
SelectedColor
The selected color.
Declaration
public Color SelectedColor { get; set; }
Property Value
| Type | Description |
|---|---|
| Color |
SelectedPosition
The position on the bar currently selected.
Declaration
public int SelectedPosition { get; }
Property Value
| Type | Description |
|---|---|
| int |
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
ColorChanged
Raised when the SelectedColor value changes.
Declaration
public event EventHandler? ColorChanged
Event Type
| Type | Description |
|---|---|
| EventHandler |