Class CustomMouseEffect
Custom grid effect for mouse LEDs.
Implements
Namespace: Colore.Effects.Mouse
Assembly: Colore.dll
Syntax
public sealed class CustomMouseEffect : ValueType, IEquatable<CustomMouseEffect>
Constructors
CustomMouseEffect(Color)
Initializes a new instance of the CustomMouseEffect struct with every position set to a specific color.
Declaration
public CustomMouseEffect(Color color)
Parameters
Type | Name | Description |
---|---|---|
Color | color | The Color to set each position to. |
CustomMouseEffect(Color[][])
Initializes a new instance of the CustomMouseEffect struct.
Declaration
public CustomMouseEffect(Color[][] colors)
Parameters
Type | Name | Description |
---|---|---|
Color[][] | colors | The colors to use. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if |
ArgumentException | Thrown if the colors array supplied is of an incorrect size. |
CustomMouseEffect(CustomMouseEffect)
Initializes a new instance of the CustomMouseEffect struct with the colors copied from another struct of the same type.
Declaration
public CustomMouseEffect(CustomMouseEffect other)
Parameters
Type | Name | Description |
---|---|---|
CustomMouseEffect | other | The CustomMouseEffect struct to copy data from. |
CustomMouseEffect(IList<Color>)
Initializes a new instance of the CustomMouseEffect struct.
Declaration
public CustomMouseEffect(IList<Color> colors)
Parameters
Type | Name | Description |
---|---|---|
IList<Color> | colors | The colors to use. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown if |
ArgumentException | Thrown if the colors array supplied is of an invalid size. |
Properties
Item[GridLed]
Gets or sets the color for a specific LED in the CustomMouseEffect.
Declaration
public Color this[GridLed led] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
GridLed | led | The GridLed to access. |
Property Value
Type | Description |
---|---|
Color | The Color for the specified led. |
Item[Int32]
Gets or sets a position in the custom grid.
Declaration
public Color this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | The index to access, zero indexed. |
Property Value
Type | Description |
---|---|
Color |
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException | Thrown if the requested index is out of range. |
Item[Int32, Int32]
Gets or sets cells in the CustomMouseEffect.
Declaration
public Color this[int row, int column] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
Int32 | row | Row to access, zero indexed. |
Int32 | column | Column to access, zero indexed. |
Property Value
Type | Description |
---|---|
Color | The Color at the specified position. |
Methods
Clear()
Clears the colors from the grid, setting them to Black.
Declaration
public void Clear()
Clone()
Returns a copy of this struct.
Declaration
public CustomMouseEffect Clone()
Returns
Type | Description |
---|---|
CustomMouseEffect | A copy of this struct. |
Create()
Creates a new empty CustomMouseEffect struct.
Declaration
public static CustomMouseEffect Create()
Returns
Type | Description |
---|---|
CustomMouseEffect | An instance of CustomMouseEffect filled with the color black. |
Equals(CustomMouseEffect)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(CustomMouseEffect other)
Parameters
Type | Name | Description |
---|---|---|
CustomMouseEffect | other | A CustomMouseEffect to compare with this object. |
Returns
Type | Description |
---|---|
Boolean |
|
Equals(Object)
Indicates whether this instance and a specified object are equal.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | Another object to compare to. |
Returns
Type | Description |
---|---|
Boolean |
|
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | A 32-bit signed integer that is the hash code for this instance. |
Set(Color)
Sets the entire grid to a specific Color.
Declaration
public void Set(Color color)
Parameters
Type | Name | Description |
---|---|---|
Color | color | The Color to apply. |
Operators
Equality(CustomMouseEffect, Object)
Compares an instance of CustomMouseEffect with another object for equality.
Declaration
public static bool operator ==(CustomMouseEffect left, object right)
Parameters
Type | Name | Description |
---|---|---|
CustomMouseEffect | left | The left operand, an instance of CustomMouseEffect. |
Object | right | The right operand, any type of object. |
Returns
Type | Description |
---|---|
Boolean |
|
Inequality(CustomMouseEffect, Object)
Compares an instance of CustomMouseEffect with another object for inequality.
Declaration
public static bool operator !=(CustomMouseEffect left, object right)
Parameters
Type | Name | Description |
---|---|---|
CustomMouseEffect | left | The left operand, an instance of CustomMouseEffect. |
Object | right | The right operand, any type of object. |
Returns
Type | Description |
---|---|
Boolean |
|