mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-15 21:24:18 +01:00
Add option to fix the penumbra window.
This commit is contained in:
parent
caf19f24cb
commit
c97b8e8e9a
4 changed files with 23 additions and 5 deletions
|
|
@ -45,7 +45,7 @@ public partial class Configuration : IPluginConfiguration
|
|||
public int ModSelectorScaledSize { get; set; } = Constants.DefaultScaledSize;
|
||||
public bool OpenFoldersByDefault { get; set; } = false;
|
||||
|
||||
|
||||
public bool FixMainWindow { get; set; } = false;
|
||||
public bool ShowAdvanced { get; set; }
|
||||
public bool DisableSoundStreaming { get; set; } = true;
|
||||
public bool EnableHttpApi { get; set; }
|
||||
|
|
|
|||
|
|
@ -360,6 +360,12 @@ public class Penumbra : IDisposable
|
|||
: modsDisabled );
|
||||
break;
|
||||
}
|
||||
case "unfix":
|
||||
{
|
||||
Config.FixMainWindow = false;
|
||||
_configWindow.Flags &= ~( ImGuiWindowFlags.NoMove | ImGuiWindowFlags.NoResize );
|
||||
break;
|
||||
}
|
||||
case "collection":
|
||||
{
|
||||
if( args.Length == 2 )
|
||||
|
|
|
|||
|
|
@ -37,6 +37,14 @@ public partial class ConfigWindow
|
|||
|
||||
DrawEnabledBox();
|
||||
DrawShowAdvancedBox();
|
||||
Checkbox( "Fix Main Window", "Prevent the main window from being resized or moved.", Penumbra.Config.FixMainWindow, v =>
|
||||
{
|
||||
Penumbra.Config.FixMainWindow = v;
|
||||
_window.Flags = v
|
||||
? _window.Flags | ImGuiWindowFlags.NoMove | ImGuiWindowFlags.NoResize
|
||||
: _window.Flags & ~( ImGuiWindowFlags.NoMove | ImGuiWindowFlags.NoResize );
|
||||
} );
|
||||
|
||||
ImGui.NewLine();
|
||||
DrawRootFolder();
|
||||
DrawRediscoverButton();
|
||||
|
|
|
|||
|
|
@ -36,11 +36,15 @@ public sealed partial class ConfigWindow : Window, IDisposable
|
|||
_debugTab = new DebugTab( this );
|
||||
_resourceTab = new ResourceTab( this );
|
||||
Flags |= ImGuiWindowFlags.NoDocking;
|
||||
if( Penumbra.Config.FixMainWindow )
|
||||
{
|
||||
Flags |= ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoMove;
|
||||
}
|
||||
|
||||
Dalamud.PluginInterface.UiBuilder.DisableGposeUiHide = !Penumbra.Config.HideUiInGPose;
|
||||
Dalamud.PluginInterface.UiBuilder.DisableCutsceneUiHide = !Penumbra.Config.HideUiInCutscenes;
|
||||
Dalamud.PluginInterface.UiBuilder.DisableUserUiHide = !Penumbra.Config.HideUiWhenUiHidden;
|
||||
RespectCloseHotkey = true;
|
||||
Dalamud.PluginInterface.UiBuilder.DisableGposeUiHide = !Penumbra.Config.HideUiInGPose;
|
||||
Dalamud.PluginInterface.UiBuilder.DisableCutsceneUiHide = !Penumbra.Config.HideUiInCutscenes;
|
||||
Dalamud.PluginInterface.UiBuilder.DisableUserUiHide = !Penumbra.Config.HideUiWhenUiHidden;
|
||||
RespectCloseHotkey = true;
|
||||
SizeConstraints = new WindowSizeConstraints()
|
||||
{
|
||||
MinimumSize = new Vector2( 800, 600 ),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue