mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-19 15:51:48 +00:00
improve options system
This commit is contained in:
24 files changed
+1060
-304
No files matched your search
@@ -7,9 +7,7 @@ namespace MiraAPI.Example.Options;
|
||||
public class ExampleOptions2 : AbstractOptionGroup
|
||||
{
|
||||
public override string GroupName => "options.exampleOptions2";
|
||||
|
||||
public override uint GroupPriority => 0; // This group will be displayed first. The default value is uint.MaxValue.
|
||||
|
||||
public override MenuCategory ParentMenu => MenuCategory.CustomTwo;
|
||||
|
||||
public ModdedPlayerOption PlayerOption2 { get; } = new("options.exampleOptions2.youMustChoseAPlayer", false);
|
||||
@@ -27,6 +25,8 @@ public class ExampleOptions2 : AbstractOptionGroup
|
||||
public ModdedEnumOption<TestingData> EnumOpt { get; } = new("options.exampleOptions2.enumOpt", 0)
|
||||
{
|
||||
ChangedEvent = x => Logger<ExamplePlugin>.Info($"changed Enum Opt to {x}"),
|
||||
Getter = currentValue => currentValue,
|
||||
Setter = (newValue, oldValue) => newValue,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user