Update Open Settings and Main UI.

This commit is contained in:
Ottermandias 2024-04-05 15:29:19 +02:00
parent 6e7512c13e
commit 77bf441e62
2 changed files with 11 additions and 2 deletions

View file

@ -4,6 +4,7 @@ using ImGuiNET;
using OtterGui;
using OtterGui.Custom;
using OtterGui.Raii;
using Penumbra.Api.Enums;
using Penumbra.Services;
using Penumbra.UI.Classes;
using Penumbra.UI.Tabs;
@ -35,6 +36,12 @@ public sealed class ConfigWindow : Window
IsOpen = _config.OpenWindowAtStart;
}
public void OpenSettings()
{
_configTabs.SelectTab = TabType.Settings;
IsOpen = true;
}
public void Setup(Penumbra penumbra, ConfigTabBar configTabs)
{
_penumbra = penumbra;

View file

@ -27,7 +27,8 @@ public class PenumbraWindowSystem : IDisposable
_windowSystem.AddWindow(editWindow);
_windowSystem.AddWindow(importPopup);
_windowSystem.AddWindow(debugTab);
_uiBuilder.OpenConfigUi += Window.Toggle;
_uiBuilder.OpenMainUi += Window.Toggle;
_uiBuilder.OpenConfigUi += Window.OpenSettings;
_uiBuilder.Draw += _windowSystem.Draw;
_uiBuilder.Draw += _fileDialog.Draw;
_uiBuilder.DisableGposeUiHide = !config.HideUiInGPose;
@ -40,7 +41,8 @@ public class PenumbraWindowSystem : IDisposable
public void Dispose()
{
_uiBuilder.OpenConfigUi -= Window.Toggle;
_uiBuilder.OpenMainUi -= Window.Toggle;
_uiBuilder.OpenConfigUi -= Window.OpenSettings;
_uiBuilder.Draw -= _windowSystem.Draw;
_uiBuilder.Draw -= _fileDialog.Draw;
}