mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-31 12:53:50 +01:00
.
This commit is contained in:
parent
7710cfadfa
commit
2d6fd6015d
88 changed files with 2304 additions and 383 deletions
30
GlamourerOld/Gui/GlamourerWindowSystem.cs
Normal file
30
GlamourerOld/Gui/GlamourerWindowSystem.cs
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
using System;
|
||||
using Dalamud.Interface;
|
||||
using Dalamud.Interface.Windowing;
|
||||
|
||||
namespace Glamourer.Gui;
|
||||
|
||||
public class GlamourerWindowSystem : IDisposable
|
||||
{
|
||||
private readonly WindowSystem _windowSystem = new("Glamourer");
|
||||
private readonly UiBuilder _uiBuilder;
|
||||
private readonly Interface _ui;
|
||||
|
||||
public GlamourerWindowSystem(UiBuilder uiBuilder, Interface ui)
|
||||
{
|
||||
_uiBuilder = uiBuilder;
|
||||
_ui = ui;
|
||||
_windowSystem.AddWindow(ui);
|
||||
_uiBuilder.Draw += _windowSystem.Draw;
|
||||
_uiBuilder.OpenConfigUi += _ui.Toggle;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
_uiBuilder.Draw -= _windowSystem.Draw;
|
||||
_uiBuilder.OpenConfigUi -= _ui.Toggle;
|
||||
}
|
||||
|
||||
public void Toggle()
|
||||
=> _ui.Toggle();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue