mirror of
https://github.com/DarthAffe/CUE.NET.git
synced 2025-12-12 16:58:29 +00:00
Moved brush calculation mode to the brush
This makes obviously more sense ...
This commit is contained in:
parent
286a6ea284
commit
a783e52c41
@ -1,6 +1,7 @@
|
||||
// ReSharper disable VirtualMemberNeverOverriden.Global
|
||||
|
||||
using System.Drawing;
|
||||
using CUE.NET.Devices.Keyboard.Enums;
|
||||
using CUE.NET.Helper;
|
||||
|
||||
namespace CUE.NET.Brushes
|
||||
@ -12,6 +13,11 @@ namespace CUE.NET.Brushes
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the calculation mode used for the rectangle/points used for color-selection in brushes.
|
||||
/// </summary>
|
||||
public BrushCalculationMode BrushCalculationMode { get; set; } = BrushCalculationMode.Relative;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the overall percentage brightness of the brush.
|
||||
/// </summary>
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
// ReSharper disable UnusedMemberInSuper.Global
|
||||
|
||||
using System.Drawing;
|
||||
using CUE.NET.Devices.Keyboard.Enums;
|
||||
|
||||
namespace CUE.NET.Brushes
|
||||
{
|
||||
@ -9,6 +10,11 @@ namespace CUE.NET.Brushes
|
||||
/// </summary>
|
||||
public interface IBrush
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the calculation mode used for the rectangle/points used for color-selection in brushes.
|
||||
/// </summary>
|
||||
BrushCalculationMode BrushCalculationMode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the overall percentage brightness of the brush.
|
||||
/// </summary>
|
||||
|
||||
@ -106,11 +106,6 @@ namespace CUE.NET.Devices.Keyboard
|
||||
/// </summary>
|
||||
public int ZIndex { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the calculation mode used for the rectangle/points used for color-selection in brushes.
|
||||
/// </summary>
|
||||
public BrushCalculationMode BrushCalculationMode { get; set; } = BrushCalculationMode.Relative;
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating if the keyboard has an active effect to deal with or not.
|
||||
/// </summary>
|
||||
@ -175,7 +170,7 @@ namespace CUE.NET.Devices.Keyboard
|
||||
{
|
||||
try
|
||||
{
|
||||
switch (BrushCalculationMode)
|
||||
switch (brush.BrushCalculationMode)
|
||||
{
|
||||
case BrushCalculationMode.Relative:
|
||||
RectangleF brushRectangle = RectangleHelper.CreateRectangleFromRectangles(keys.Select(x => x.KeyRectangle));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user