Plugins - Add JSON property to disable auto-enabling features

Setup wizard - Play intro animation at the end (and no where else)
This commit is contained in:
SpoinkyNL committed 2020-12-12 10:57:09 +01:00
1 parent c6181ea823
commit 8e8258506b
8 files changed
+879 -83

No files matched your search

+13
View File
@@ -1,4 +1,5 @@
using System;
using System.ComponentModel;
using Newtonsoft.Json;
namespace Artemis.Core
@@ -9,6 +10,7 @@ namespace Artemis.Core
[JsonObject(MemberSerialization.OptIn)]
public class PluginInfo : CorePropertyChanged
{
private bool _autoEnableFeatures = true;
private string? _description;
private Guid _guid;
private string? _icon;
@@ -83,6 +85,17 @@ namespace Artemis.Core
internal set => SetAndNotify(ref _main, value);
}
/// <summary>
/// Gets or sets a boolean indicating whether this plugin should automatically enable all its features when it is first loaded
/// </summary>
[DefaultValue(true)]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)]
public bool AutoEnableFeatures
{
get => _autoEnableFeatures;
set => SetAndNotify(ref _autoEnableFeatures, value);
}
/// <summary>
/// Gets the plugin this info is associated with
/// </summary>