mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 19:36:28 +00:00
UI - Made it so modules are sorted by priority in the sidebar
This commit is contained in:
1 parent
a5e2dc81a4
commit
45b82039e2
3 files changed
+49
-22
No files matched your search
@@ -1,4 +1,5 @@
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Artemis.Core.Modules;
|
||||
|
||||
namespace Artemis.Core.Services
|
||||
@@ -8,6 +9,11 @@ namespace Artemis.Core.Services
|
||||
/// </summary>
|
||||
public interface IModuleService : IArtemisService
|
||||
{
|
||||
/// <summary>
|
||||
/// Occurs when the priorty of a module is updated.
|
||||
/// </summary>
|
||||
event EventHandler ModulePriorityUpdated;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current active module override. If set, all other modules are deactivated and only the
|
||||
/// <see cref="ActiveModuleOverride" /> is active.
|
||||
|
||||
@@ -149,6 +149,8 @@ namespace Artemis.Core.Services
|
||||
UpdateModulePriority(module, category, priority);
|
||||
}
|
||||
|
||||
public event EventHandler ModulePriorityUpdated;
|
||||
|
||||
public Module? ActiveModuleOverride { get; private set; }
|
||||
|
||||
public async Task SetActiveModuleOverride(Module? overrideModule)
|
||||
@@ -261,6 +263,8 @@ namespace Artemis.Core.Services
|
||||
_moduleRepository.Save(categoryModule.SettingsEntity);
|
||||
}
|
||||
}
|
||||
|
||||
ModulePriorityUpdated?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user