Class CustomKeyboardEffect
Describes a custom grid effect for every key.
Implements
Namespace: Colore.Effects.Keyboard
Assembly: Colore.dll
Syntax
public sealed class CustomKeyboardEffect : ValueType, IEquatable<CustomKeyboardEffect>
Constructors
CustomKeyboardEffect(Color)
Initializes a new instance of the CustomKeyboardEffect struct with every position set to a specific color.
Declaration
public CustomKeyboardEffect(Color color)
Parameters
Type | Name | Description |
---|---|---|
Color | color | The Color to set each position to. |
CustomKeyboardEffect(CustomKeyboardEffect)
Initializes a new instance of the CustomKeyboardEffect struct with the colors copied from another struct of the same type.
Declaration
public CustomKeyboardEffect(CustomKeyboardEffect other)
Parameters
Type | Name | Description |
---|---|---|
CustomKeyboardEffect | other | The CustomKeyboardEffect struct to copy data from. |
Properties
Item[Key]
Gets or sets the color for a specific key in the custom grid. The SDK will handle translation of location data to access the correct key depending on user configuration.
Declaration
public Color this[Key key] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
Key | key | The Key to access. |
Property Value
Type | Description |
---|---|
Color | The Color for the specified key. |
Remarks
Please note that the position of a key accessed in this way is not guaranteed to be correct, as different layouts on different keyboards can place these keys in other locations.
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 | The Color at the specified position. |
Item[Int32, Int32]
Gets or sets cells in the custom grid.
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 CustomKeyboardEffect Clone()
Returns
Type | Description |
---|---|
CustomKeyboardEffect | A copy of this struct. |
Create()
Creates a new empty CustomKeyboardEffect struct.
Declaration
public static CustomKeyboardEffect Create()
Returns
Type | Description |
---|---|
CustomKeyboardEffect | An instance of CustomKeyboardEffect filled with the color black. |
Equals(CustomKeyboardEffect)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(CustomKeyboardEffect other)
Parameters
Type | Name | Description |
---|---|---|
CustomKeyboardEffect | other | A CustomKeyboardEffect 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(CustomKeyboardEffect, Object)
Compares an instance of CustomKeyboardEffect with another object for equality.
Declaration
public static bool operator ==(CustomKeyboardEffect left, object right)
Parameters
Type | Name | Description |
---|---|---|
CustomKeyboardEffect | left | The left operand, an instance of CustomKeyboardEffect. |
Object | right | The right operand, any type of object. |
Returns
Type | Description |
---|---|
Boolean |
|
Inequality(CustomKeyboardEffect, Object)
Compares an instance of CustomKeyboardEffect with another object for inequality.
Declaration
public static bool operator !=(CustomKeyboardEffect left, object right)
Parameters
Type | Name | Description |
---|---|---|
CustomKeyboardEffect | left | The left operand, an instance of CustomKeyboardEffect. |
Object | right | The right operand, any type of object. |
Returns
Type | Description |
---|---|
Boolean |
|