25 lines
676 B
C#
25 lines
676 B
C#
using Dalamud.Game.Command;
|
|
using System;
|
|
|
|
namespace GlamourBrowser {
|
|
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();
|
|
}
|
|
}
|
|
}
|