mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2025-12-12 17:48:31 +00:00
Added IsEnabled to Brushes and Effects
This commit is contained in:
parent
2a5b8d0435
commit
6edef71875
@ -14,6 +14,9 @@ namespace RGB.NET.Core
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsEnabled { get; set; } = true;
|
||||
|
||||
/// <inheritdoc />
|
||||
public BrushCalculationMode BrushCalculationMode { get; set; } = BrushCalculationMode.Relative;
|
||||
|
||||
|
||||
@ -11,6 +11,11 @@ namespace RGB.NET.Core
|
||||
/// </summary>
|
||||
public interface IBrush : IEffectTarget<IBrush>
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets if the <see cref="IBrush"/> is enabled and will be drawn on an update.
|
||||
/// </summary>
|
||||
bool IsEnabled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the calculation mode used for the rectangle/points used for color-selection in brushes.
|
||||
/// </summary>
|
||||
|
||||
@ -10,6 +10,9 @@ namespace RGB.NET.Core
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsEnabled { get; set; } = true;
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsDone { get; protected set; }
|
||||
|
||||
|
||||
@ -45,6 +45,8 @@ namespace RGB.NET.Core
|
||||
for (int i = EffectTimes.Count - 1; i >= 0; i--)
|
||||
{
|
||||
EffectTimeContainer effectTime = EffectTimes[i];
|
||||
if (!effectTime.Effect.IsEnabled) continue;
|
||||
|
||||
long currentTicks = DateTime.Now.Ticks;
|
||||
|
||||
double deltaTime;
|
||||
|
||||
@ -12,6 +12,9 @@ namespace RGB.NET.Core
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsEnabled { get; set; } = true;
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsDone { get; protected set; }
|
||||
|
||||
|
||||
@ -11,6 +11,11 @@ namespace RGB.NET.Core
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets if the <see cref="IEffect"/> is enabled and will be updated.
|
||||
/// </summary>
|
||||
bool IsEnabled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets if this <see cref="IEffect"/> has finished all of his work.
|
||||
/// </summary>
|
||||
|
||||
@ -93,6 +93,8 @@ namespace RGB.NET.Core
|
||||
IList<Led> leds = ledGroup.GetLeds().ToList();
|
||||
IBrush brush = ledGroup.Brush;
|
||||
|
||||
if (!brush.IsEnabled) return;
|
||||
|
||||
try
|
||||
{
|
||||
switch (brush.BrushCalculationMode)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user