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:17 +01:00
parent 1891957670
commit 108cfbd828
3 changed files with 4 additions and 2 deletions

View file

@ -39,6 +39,7 @@ public class Configuration : IPluginConfiguration, ISavable
public bool LockDesignQuickBar { get; set; } = false; public bool LockDesignQuickBar { get; set; } = false;
public bool ShowQuickBarInTabs { get; set; } = true; public bool ShowQuickBarInTabs { get; set; } = true;
public bool LockMainWindow { get; set; } = false; public bool LockMainWindow { get; set; } = false;
public bool OpenWindowAtStart { get; set; } = false;
public ModifiableHotkey ToggleQuickDesignBar { get; set; } = new(VirtualKey.NO_KEY); public ModifiableHotkey ToggleQuickDesignBar { get; set; } = new(VirtualKey.NO_KEY);
public MainWindow.TabType SelectedTab { get; set; } = MainWindow.TabType.Settings; public MainWindow.TabType SelectedTab { get; set; } = MainWindow.TabType.Settings;

View file

@ -76,7 +76,7 @@ public class MainWindow : Window, IDisposable
debugTab, debugTab,
}; };
_event.Subscribe(OnTabSelected, TabSelected.Priority.MainWindow); _event.Subscribe(OnTabSelected, TabSelected.Priority.MainWindow);
IsOpen = _config.DebugMode; IsOpen = _config.OpenWindowAtStart;
} }
public override void PreDraw() public override void PreDraw()

View file

@ -136,7 +136,8 @@ public class SettingsTab : ITab
}); });
Checkbox("Lock Main Window", "Prevent the main window from being moved and lock it in place.", _config.LockMainWindow, Checkbox("Lock Main Window", "Prevent the main window from being moved and lock it in place.", _config.LockMainWindow,
v => _config.LockMainWindow = v); v => _config.LockMainWindow = v);
Checkbox("Open Main Window at Game Start", "Whether the main Glamourer window should be open or closed after launching the game.",
_config.OpenWindowAtStart, v => _config.OpenWindowAtStart = v);
ImGui.Dummy(Vector2.Zero); ImGui.Dummy(Vector2.Zero);
ImGui.Separator(); ImGui.Separator();
ImGui.Dummy(Vector2.Zero); ImGui.Dummy(Vector2.Zero);