/// <summary> /// Initializes a new instance of the <see cref="XIVComboExpandedPlugin"/> class. /// </summary> /// <param name="pluginInterface">Dalamud plugin interface.</param> public XIVComboExpandedPlugin(DalamudPluginInterface pluginInterface) { FFXIVClientStructs.Resolver.Initialize(); pluginInterface.Create <Service>(); Service.Configuration = pluginInterface.GetPluginConfig() as PluginConfiguration ?? new PluginConfiguration(); Service.Address = new PluginAddressResolver(); Service.Address.Setup(); if (Service.Configuration.Version == 4) { this.UpgradeConfig4(); } Service.ComboCache = new CustomComboCache(); Service.IconReplacer = new IconReplacer(); this.configWindow = new(); this.windowSystem = new("XIVComboExpanded"); this.windowSystem.AddWindow(this.configWindow); Service.Interface.UiBuilder.OpenConfigUi += this.OnOpenConfigUi; Service.Interface.UiBuilder.Draw += this.windowSystem.Draw; Service.CommandManager.AddHandler(Command, new CommandInfo(this.OnCommand) { HelpMessage = "Open a window to edit custom combo settings.", ShowInHelp = true, }); }
/// <summary> /// Initializes a new instance of the <see cref="SomethingNeedDoingPlugin"/> class. /// </summary> /// <param name="pluginInterface">Dalamud plugin interface.</param> public SomethingNeedDoingPlugin(DalamudPluginInterface pluginInterface) { pluginInterface.Create <Service>(); ClickLib.Click.Initialize(); Service.Plugin = this; Service.Configuration = SomethingNeedDoingConfiguration.Load(pluginInterface.ConfigDirectory); Service.ChatManager = new ChatManager(); Service.GameEventManager = new GameEventManager(); Service.MacroManager = new MacroManager(); this.macroWindow = new(); this.helpWindow = new(); this.windowSystem = new("SomethingNeedDoing"); this.windowSystem.AddWindow(this.macroWindow); this.windowSystem.AddWindow(this.helpWindow); Service.Interface.UiBuilder.Draw += this.windowSystem.Draw; Service.Interface.UiBuilder.OpenConfigUi += this.OnOpenConfigUi; Service.CommandManager.AddHandler(Command, new CommandInfo(this.OnChatCommand) { HelpMessage = "Open a window to edit various settings.", ShowInHelp = true, }); }
public static void Initialize(DalamudPluginInterface pluginInterface) => pluginInterface.Create <Dalamud>();