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