コード例 #1
0
ファイル: Plugin.cs プロジェクト: Strati/DeepDungeonDex
        public Plugin(
            DalamudPluginInterface pluginInterface,
            ClientState clientState,
            CommandManager commands,
            Condition condition,
            Framework framework,
            //SeStringManager seStringManager,
            TargetManager targets)
        {
            this.pluginInterface = pluginInterface;
            this._clientState    = clientState;
            this._condition      = condition;
            this._framework      = framework;
            this._commands       = commands;
            this._targetManager  = targets;

            this.config = (Configuration)this.pluginInterface.GetPluginConfig() ?? new Configuration();
            this.config.Initialize(this.pluginInterface);
            this.ui  = new PluginUI(config, clientState);
            this.cui = new ConfigUI(config.Opacity, config.IsClickthrough, config.HideRedVulns, config.HideBasedOnJob, config);
            this.pluginInterface.UiBuilder.Draw += this.ui.Draw;
            this.pluginInterface.UiBuilder.Draw += this.cui.Draw;

            this._commands.AddHandler("/pddd", new CommandInfo(OpenConfig)
            {
                HelpMessage = "DeepDungeonDex config"
            });

            this._framework.Update += this.GetData;
        }
コード例 #2
0
        public void Initialize(DalamudPluginInterface pluginInterface)
        {
            this.pluginInterface = pluginInterface;

            this.config = (Configuration)this.pluginInterface.GetPluginConfig() ?? new Configuration();
            this.config.Initialize(this.pluginInterface);
            this.ui  = new PluginUI(config, pluginInterface);
            this.cui = new ConfigUI(config.Opacity, config.IsClickthrough, config);
            this.pluginInterface.UiBuilder.OnBuildUi += this.ui.Draw;
            this.pluginInterface.UiBuilder.OnBuildUi += this.cui.Draw;

            this.pluginInterface.CommandManager.AddHandler("/pddd", new CommandInfo(OpenConfig)
            {
                HelpMessage = "DeepDungeonDex config"
            });

            this.pluginInterface.Framework.OnUpdateEvent += this.GetData;
        }