mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-13 12:14:17 +01:00
Add options for UI hiding.
This commit is contained in:
parent
50a3a20718
commit
3d7faad2ae
3 changed files with 42 additions and 3 deletions
|
|
@ -17,6 +17,9 @@ public partial class Configuration : IPluginConfiguration
|
||||||
public bool EnableMods { get; set; } = true;
|
public bool EnableMods { get; set; } = true;
|
||||||
public string ModDirectory { get; set; } = string.Empty;
|
public string ModDirectory { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public bool HideUiInGPose { get; set; } = false;
|
||||||
|
public bool HideUiInCutscenes { get; set; } = true;
|
||||||
|
public bool HideUiWhenUiHidden { get; set; } = false;
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
public bool DebugMode { get; set; } = true;
|
public bool DebugMode { get; set; } = true;
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,20 @@ public partial class ConfigWindow
|
||||||
{
|
{
|
||||||
private partial class SettingsTab
|
private partial class SettingsTab
|
||||||
{
|
{
|
||||||
|
private static void Checkbox( string label, string tooltip, bool current, Action< bool > setter )
|
||||||
|
{
|
||||||
|
using var id = ImRaii.PushId( label );
|
||||||
|
var tmp = current;
|
||||||
|
if( ImGui.Checkbox( string.Empty, ref tmp ) && tmp != current )
|
||||||
|
{
|
||||||
|
setter( tmp );
|
||||||
|
Penumbra.Config.Save();
|
||||||
|
}
|
||||||
|
|
||||||
|
ImGui.SameLine();
|
||||||
|
ImGuiUtil.LabeledHelpMarker( label, tooltip );
|
||||||
|
}
|
||||||
|
|
||||||
private void DrawModSelectorSettings()
|
private void DrawModSelectorSettings()
|
||||||
{
|
{
|
||||||
if( !ImGui.CollapsingHeader( "General" ) )
|
if( !ImGui.CollapsingHeader( "General" ) )
|
||||||
|
|
@ -20,6 +34,28 @@ public partial class ConfigWindow
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Checkbox( "Hide Config Window when UI is Hidden",
|
||||||
|
"Hide the penumbra main window when you manually hide the in-game user interface.", Penumbra.Config.HideUiWhenUiHidden,
|
||||||
|
v =>
|
||||||
|
{
|
||||||
|
Penumbra.Config.HideUiWhenUiHidden = v;
|
||||||
|
Dalamud.PluginInterface.UiBuilder.DisableUserUiHide = !v;
|
||||||
|
} );
|
||||||
|
Checkbox( "Hide Config Window when in Cutscenes",
|
||||||
|
"Hide the penumbra main window when you are currently watching a cutscene.", Penumbra.Config.HideUiInCutscenes,
|
||||||
|
v =>
|
||||||
|
{
|
||||||
|
Penumbra.Config.HideUiInCutscenes = v;
|
||||||
|
Dalamud.PluginInterface.UiBuilder.DisableCutsceneUiHide = !v;
|
||||||
|
} );
|
||||||
|
Checkbox( "Hide Config Window when in GPose",
|
||||||
|
"Hide the penumbra main window when you are currently in GPose mode.", Penumbra.Config.HideUiInGPose,
|
||||||
|
v =>
|
||||||
|
{
|
||||||
|
Penumbra.Config.HideUiInGPose = v;
|
||||||
|
Dalamud.PluginInterface.UiBuilder.DisableGposeUiHide = !v;
|
||||||
|
} );
|
||||||
|
ImGui.Dummy( _window._defaultSpace );
|
||||||
DrawFolderSortType();
|
DrawFolderSortType();
|
||||||
DrawAbsoluteSizeSelector();
|
DrawAbsoluteSizeSelector();
|
||||||
DrawRelativeSizeSelector();
|
DrawRelativeSizeSelector();
|
||||||
|
|
|
||||||
|
|
@ -36,9 +36,9 @@ public sealed partial class ConfigWindow : Window, IDisposable
|
||||||
_debugTab = new DebugTab( this );
|
_debugTab = new DebugTab( this );
|
||||||
_resourceTab = new ResourceTab( this );
|
_resourceTab = new ResourceTab( this );
|
||||||
|
|
||||||
Dalamud.PluginInterface.UiBuilder.DisableGposeUiHide = true;
|
Dalamud.PluginInterface.UiBuilder.DisableGposeUiHide = !Penumbra.Config.HideUiInGPose;
|
||||||
Dalamud.PluginInterface.UiBuilder.DisableCutsceneUiHide = true;
|
Dalamud.PluginInterface.UiBuilder.DisableCutsceneUiHide = !Penumbra.Config.HideUiInCutscenes;
|
||||||
Dalamud.PluginInterface.UiBuilder.DisableUserUiHide = true;
|
Dalamud.PluginInterface.UiBuilder.DisableUserUiHide = !Penumbra.Config.HideUiWhenUiHidden;
|
||||||
RespectCloseHotkey = true;
|
RespectCloseHotkey = true;
|
||||||
SizeConstraints = new WindowSizeConstraints()
|
SizeConstraints = new WindowSizeConstraints()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue