/// <summary>
 /// Initializes a new instance of the <see cref="SettingsWindow"/> class.
 /// </summary>
 /// <param name="plugin">kapture plugin.</param>
 public SettingsWindow(KapturePlugin plugin)
     : base(plugin, "Kapture Config")
 {
     this.plugin = plugin;
     this.UpdateItemList();
     this.RespectCloseHotkey = true;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="WindowManager"/> class.
        /// </summary>
        /// <param name="kapturePlugin">Kapture plugin.</param>
        public WindowManager(KapturePlugin kapturePlugin)
        {
            this.Plugin = kapturePlugin;

            // create windows
            this.LootWindow     = new LootWindow(kapturePlugin);
            this.RollWindow     = new RollWindow(kapturePlugin);
            this.SettingsWindow = new SettingsWindow(kapturePlugin);

            // set initial state
            this.LootWindow.IsOpen = this.Plugin.Configuration.ShowLootOverlay;
            this.RollWindow.IsOpen = this.Plugin.Configuration.ShowRollMonitorOverlay;

            // setup window systems
            this.LootWindowSystem   = new WindowSystem("KaptureLootWindowSystem");
            this.RollWindowSystem   = new WindowSystem("KaptureRollWindowSystem");
            this.ConfigWindowSystem = new WindowSystem("KaptureConfigWindowSystem");

            // add event listeners
            KapturePlugin.PluginInterface.UiBuilder.Draw         += this.Draw;
            KapturePlugin.PluginInterface.UiBuilder.OpenConfigUi += this.OpenConfigUi;
        }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LootWindow"/> class.
 /// </summary>
 /// <param name="plugin">plugin.</param>
 public LootWindow(KapturePlugin plugin)
     : base(plugin, Loc.Localize("LootOverlayWindow", "Loot") + "###Kapture_Loot_Window")
 {
     this.plugin = plugin;
 }
Example #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RollWindow"/> class.
 /// </summary>
 /// <param name="plugin">plugin.</param>
 public RollWindow(KapturePlugin plugin)
     : base(plugin, Loc.Localize("RollMonitorOverlayWindow", "Roll Monitor") + "###Kapture_RollMonitor_Window")
 {
     this.plugin = plugin;
 }
Example #5
0
 public void Initialize(DalamudPluginInterface pluginInterface)
 {
     _kapturePlugin = new KapturePlugin(Name, pluginInterface);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="PluginWindow"/> class.
 /// </summary>
 /// <param name="plugin">Kapture plugin.</param>
 /// <param name="windowName">Name of the window.</param>
 /// <param name="flags">ImGui flags.</param>
 protected PluginWindow(KapturePlugin plugin, string windowName, ImGuiWindowFlags flags = ImGuiWindowFlags.None)
     : base(windowName, flags)
 {
     this.Plugin             = plugin;
     this.RespectCloseHotkey = false;
 }