This commit is contained in:
24
GlamourBrowser/Commands.cs
Normal file
24
GlamourBrowser/Commands.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using Dalamud.Game.Command;
|
||||
using System;
|
||||
|
||||
namespace Glamaholic {
|
||||
internal class Commands : IDisposable {
|
||||
private Plugin Plugin { get; }
|
||||
|
||||
internal Commands(Plugin plugin) {
|
||||
this.Plugin = plugin;
|
||||
|
||||
Service.CommandManager.AddHandler("/gbrowser", new CommandInfo(this.OnCommand) {
|
||||
HelpMessage = $"Toggle visibility of the {Plugin.Name} window",
|
||||
});
|
||||
}
|
||||
|
||||
public void Dispose() {
|
||||
Service.CommandManager.RemoveHandler("/gbrowser");
|
||||
}
|
||||
|
||||
private void OnCommand(string command, string arguments) {
|
||||
this.Plugin.Ui.ToggleMainInterface();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user