CurrencyAlertClassic/CurrencyAlert/Commands/OverlayCommands.cs
MidoriKami e97fe36ba0
Complete Rework + Update (#15)
* Remove unused dalamud packager overrides

* Use category tags, add actual description

* Use .net7

* Update DalamudPackager, update for Api8

* Remove hardcoded images, we'll use lumina to get these dynamically

* Add KamiLib

* Refactor Currency Alert

* Add LocalizationManager.cs

* remove trailing comma

* Add No Decoration flag

* More touchups and features

* Increase Version Number 0.5.0.0

* Move Chat Notifications to its own category

* Hide overlay if not logged in or there are no warnings to show

* Increase update frequency to 4x per second
2023-01-10 21:07:57 +01:00

45 lines
1.4 KiB
C#

using System.Collections.Generic;
using CurrencyAlert.Localization;
using KamiLib.ChatCommands;
using KamiLib.Interfaces;
namespace CurrencyAlert.Commands;
public class OverlayCommands : IPluginCommand
{
public string CommandArgument => "overlay";
public IEnumerable<ISubCommand> SubCommands { get; } = new List<ISubCommand>
{
new SubCommand
{
CommandKeyword = "show",
CommandAction = () =>
{
Service.Configuration.OverlaySettings.Show.Value = true;
Service.Configuration.Save();
},
GetHelpText = () => Strings.Commands_ShowOverlayHelp,
},
new SubCommand
{
CommandKeyword = "hide",
CommandAction = () =>
{
Service.Configuration.OverlaySettings.Show.Value = false;
Service.Configuration.Save();
},
GetHelpText = () => Strings.Commands_HideOverlayHelp,
},
new SubCommand
{
CommandKeyword = "toggle",
CommandAction = () =>
{
Service.Configuration.OverlaySettings.Show.Value = !Service.Configuration.OverlaySettings.Show.Value;
Service.Configuration.Save();
},
GetHelpText = () => Strings.Commands_ToggleOverlayHelp,
},
};
}