27 lines
723 B
C#
Executable File
27 lines
723 B
C#
Executable File
using System;
|
|
using Dalamud.Game.Command;
|
|
|
|
namespace TextBoxStyler {
|
|
public class Commands : IDisposable {
|
|
private const string CommandName = "/textstyle";
|
|
|
|
private Plugin Plugin { get; }
|
|
|
|
internal Commands(Plugin plugin) {
|
|
this.Plugin = plugin;
|
|
|
|
this.Plugin.CommandManager.AddHandler(CommandName, new CommandInfo(this.OnCommand) {
|
|
HelpMessage = $"Opens the settings for {this.Plugin.Name}",
|
|
});
|
|
}
|
|
|
|
public void Dispose() {
|
|
this.Plugin.CommandManager.RemoveHandler(CommandName);
|
|
}
|
|
|
|
private void OnCommand(string command, string args) {
|
|
this.Plugin.Ui.ToggleConfig();
|
|
}
|
|
}
|
|
}
|