Add option to open window at game start instead of coupling it with debug mode

This commit is contained in:
Ottermandias 2023-11-11 21:09:49 +01:00
parent b5377a961f
commit 51dba221c4
3 changed files with 8 additions and 4 deletions

View file

@ -35,6 +35,7 @@ public class Configuration : IPluginConfiguration, ISavable
public string ModDirectory { get; set; } = string.Empty; public string ModDirectory { get; set; } = string.Empty;
public string ExportDirectory { get; set; } = string.Empty; public string ExportDirectory { get; set; } = string.Empty;
public bool OpenWindowAtStart { get; set; } = false;
public bool HideUiInGPose { get; set; } = false; public bool HideUiInGPose { get; set; } = false;
public bool HideUiInCutscenes { get; set; } = true; public bool HideUiInCutscenes { get; set; } = true;
public bool HideUiWhenUiHidden { get; set; } = false; public bool HideUiWhenUiHidden { get; set; } = false;

View file

@ -32,7 +32,7 @@ public sealed class ConfigWindow : Window
RespectCloseHotkey = true; RespectCloseHotkey = true;
tutorial.UpdateTutorialStep(); tutorial.UpdateTutorialStep();
IsOpen = _config.DebugMode; IsOpen = _config.OpenWindowAtStart;
} }
public void Setup(Penumbra penumbra, ConfigTabBar configTabs) public void Setup(Penumbra penumbra, ConfigTabBar configTabs)

View file

@ -345,22 +345,25 @@ public class SettingsTab : ITab
/// <summary> Draw the window hiding state checkboxes. </summary> /// <summary> Draw the window hiding state checkboxes. </summary>
private void DrawHidingSettings() private void DrawHidingSettings()
{ {
Checkbox("Open Config Window at Game Start", "Whether the Penumbra main window should be open or closed after launching the game.",
_config.OpenWindowAtStart, v => _config.OpenWindowAtStart = v);
Checkbox("Hide Config Window when UI is Hidden", Checkbox("Hide Config Window when UI is Hidden",
"Hide the penumbra main window when you manually hide the in-game user interface.", _config.HideUiWhenUiHidden, "Hide the Penumbra main window when you manually hide the in-game user interface.", _config.HideUiWhenUiHidden,
v => v =>
{ {
_config.HideUiWhenUiHidden = v; _config.HideUiWhenUiHidden = v;
_dalamud.UiBuilder.DisableUserUiHide = !v; _dalamud.UiBuilder.DisableUserUiHide = !v;
}); });
Checkbox("Hide Config Window when in Cutscenes", Checkbox("Hide Config Window when in Cutscenes",
"Hide the penumbra main window when you are currently watching a cutscene.", _config.HideUiInCutscenes, "Hide the Penumbra main window when you are currently watching a cutscene.", _config.HideUiInCutscenes,
v => v =>
{ {
_config.HideUiInCutscenes = v; _config.HideUiInCutscenes = v;
_dalamud.UiBuilder.DisableCutsceneUiHide = !v; _dalamud.UiBuilder.DisableCutsceneUiHide = !v;
}); });
Checkbox("Hide Config Window when in GPose", Checkbox("Hide Config Window when in GPose",
"Hide the penumbra main window when you are currently in GPose mode.", _config.HideUiInGPose, "Hide the Penumbra main window when you are currently in GPose mode.", _config.HideUiInGPose,
v => v =>
{ {
_config.HideUiInGPose = v; _config.HideUiInGPose = v;