Class NativeColorPanel
A Panel that allows you to select a Color.
Inherited Members
Namespace: LemonUI.Menus
Assembly: LemonUI.SHVDN3.dll
Syntax
public class NativeColorPanel : NativePanel, IEnumerable<NativeColorData>, IEnumerable
Constructors
View SourceNativeColorPanel()
Creates a color panel with no Items or Title.
Declaration
public NativeColorPanel()
NativeColorPanel(string, params NativeColorData[])
Creates a Panel with a specific Title and set of Colors.
Declaration
public NativeColorPanel(string title, params NativeColorData[] colors)
Parameters
| Type | Name | Description |
|---|---|---|
| string | title | The title of the panel. |
| NativeColorData[] | colors | The colors of the panel. |
Fields
View SourceDefaultSound
The default sound used for the Color Navigation.
Declaration
public static readonly Sound DefaultSound
Field Value
| Type | Description |
|---|---|
| Sound |
Properties
View SourceClickable
If the item has controls that can be clicked.
Declaration
public override bool Clickable { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Overrides
View SourceColors
The colors shown on this Panel.
Declaration
public List<NativeColorData> Colors { get; }
Property Value
| Type | Description |
|---|---|
| List<NativeColorData> |
MaxItems
THe maximum number of items shown on the screen.
Declaration
public int MaxItems { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Opacity
The opacity value of the color.
Declaration
public int Opacity { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Remarks
The value needs to be set between 100 and 0. It will return -1 if ShowOpacity is set to false.
SelectedColor
The currently selected color.
Declaration
public Color SelectedColor { get; }
Property Value
| Type | Description |
|---|---|
| Color |
Remarks
If ShowOpacity is set to true.
SelectedIndex
The index of the currently selected Color.
Declaration
public int SelectedIndex { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
SelectedItem
Returns the currently selected NativeColorData.
Declaration
public NativeColorData SelectedItem { get; }
Property Value
| Type | Description |
|---|---|
| NativeColorData |
ShowCount
If the count of items should be shown as part of the title.
Declaration
public bool ShowCount { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
ShowOpacity
If the Opacity selector should be shown.
Declaration
public bool ShowOpacity { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Sound
The sound played when the item is changed.
Declaration
public Sound Sound { get; set; }
Property Value
| Type | Description |
|---|---|
| Sound |
Title
The Title used for the Panel when TitleStyle is set to Simple.
Declaration
public string Title { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
TitleStyle
The style of the Panel Title.
Declaration
public ColorTitleStyle TitleStyle { get; set; }
Property Value
| Type | Description |
|---|---|
| ColorTitleStyle |
Methods
View SourceAdd(NativeColorData)
Adds a color to the Panel.
Declaration
public void Add(NativeColorData color)
Parameters
| Type | Name | Description |
|---|---|---|
| NativeColorData | color | The color to add. |
Clear()
Removes all of the colors from the Panel.
Declaration
public void Clear()
Contains(NativeColorData)
Checks if the Color Data is present on this Panel.
Declaration
public void Contains(NativeColorData color)
Parameters
| Type | Name | Description |
|---|---|---|
| NativeColorData | color | The Color Data to check. |
GetEnumerator()
Declaration
public IEnumerator<NativeColorData> GetEnumerator()
Returns
| Type | Description |
|---|---|
| IEnumerator<NativeColorData> |
Next()
Moves to the Next Color.
Declaration
public void Next()
Previous()
Moves to the Previous Color.
Declaration
public void Previous()
Process()
Draws the Color Panel.
Declaration
public override void Process()
Overrides
View SourceRecalculate(PointF, float)
Recalculates the position of the Color Panel.
Declaration
public override void Recalculate(PointF position, float width)
Parameters
| Type | Name | Description |
|---|---|---|
| PointF | position | The position of the panel. |
| float | width | The width of the menu. |
Overrides
View SourceRemove(NativeColorData)
Removes a color from the panel.
Declaration
public void Remove(NativeColorData color)
Parameters
| Type | Name | Description |
|---|---|---|
| NativeColorData | color | The color to remove. |
Remove(Func<NativeColorData, bool>)
Removes all of the
Declaration
public void Remove(Func<NativeColorData, bool> func)
Parameters
| Type | Name | Description |
|---|---|---|
| Func<NativeColorData, bool> | func |