Skip to content

Commit

Permalink
menu extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
Dyvinia committed Mar 18, 2024
1 parent ea51cbd commit c6affc9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
19 changes: 19 additions & 0 deletions DatapathFixPlugin/Extensions/DatapathFixMenuExtension.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Diagnostics;
using System.IO;
using Frosty.Core;
using FrostySdk;
Expand Down Expand Up @@ -45,4 +46,22 @@ public string FSBasePath {
}
});
}

public class DPFGithubMenuExtension : MenuExtension {
public override string TopLevelMenuName => "Tools";
public override string SubLevelMenuName => "DatapathFix";

public override string MenuItemName => "Github";

public override RelayCommand MenuItemClicked => new RelayCommand((o) => Process.Start("https://github.com/Dyvinia/DatapathFixPlugin"));
}

public class DPFDonateMenuExtension : MenuExtension {
public override string TopLevelMenuName => "Tools";
public override string SubLevelMenuName => "DatapathFix";

public override string MenuItemName => "Donate";

public override RelayCommand MenuItemClicked => new RelayCommand((o) => Process.Start("https://ko-fi.com/Dyvinia"));
}
}
4 changes: 3 additions & 1 deletion DatapathFixPlugin/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,6 @@

[assembly: RegisterOptionsExtension(typeof(LaunchOptions), PluginManagerType.Both)]
[assembly: RegisterExecutionAction(typeof(LaunchExecutionAction))]
[assembly: RegisterMenuExtension(typeof(DatapathFixMenuExtension), PluginManagerType.Both)]
[assembly: RegisterMenuExtension(typeof(DatapathFixMenuExtension), PluginManagerType.Both)]
[assembly: RegisterMenuExtension(typeof(DPFGithubMenuExtension), PluginManagerType.Both)]
[assembly: RegisterMenuExtension(typeof(DPFDonateMenuExtension), PluginManagerType.Both)]

0 comments on commit c6affc9

Please sign in to comment.