mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-13 12:14:17 +01:00
Title screen menu button offset
This commit is contained in:
parent
906e057943
commit
f79405e656
3 changed files with 17 additions and 2 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Numerics;
|
||||||
using Dalamud.Configuration;
|
using Dalamud.Configuration;
|
||||||
using Dalamud.Logging;
|
using Dalamud.Logging;
|
||||||
|
|
||||||
|
|
@ -36,6 +37,7 @@ namespace Penumbra
|
||||||
public Dictionary< string, string > ModSortOrder { get; set; } = new();
|
public Dictionary< string, string > ModSortOrder { get; set; } = new();
|
||||||
|
|
||||||
public bool InvertModListOrder { internal get; set; }
|
public bool InvertModListOrder { internal get; set; }
|
||||||
|
public Vector2 ManageModsButtonOffset { get; set; } = Vector2.Zero;
|
||||||
|
|
||||||
public static Configuration Load()
|
public static Configuration Load()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ namespace Penumbra.UI
|
||||||
var ss = ImGui.GetMainViewport().Size + ImGui.GetMainViewport().Pos;
|
var ss = ImGui.GetMainViewport().Size + ImGui.GetMainViewport().Pos;
|
||||||
ImGui.SetNextWindowViewport( ImGui.GetMainViewport().ID );
|
ImGui.SetNextWindowViewport( ImGui.GetMainViewport().ID );
|
||||||
|
|
||||||
ImGui.SetNextWindowPos( ss - WindowPosOffset, ImGuiCond.Always );
|
ImGui.SetNextWindowPos( ss - WindowPosOffset + Penumbra.Config.ManageModsButtonOffset, ImGuiCond.Always );
|
||||||
|
|
||||||
if( ImGui.Begin( MenuButtonsName, ButtonFlags )
|
if( ImGui.Begin( MenuButtonsName, ButtonFlags )
|
||||||
&& ImGui.Button( MenuButtonLabel, WindowSize ) )
|
&& ImGui.Button( MenuButtonLabel, WindowSize ) )
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ namespace Penumbra.UI
|
||||||
private const string LabelDisableNotifications = "Disable filesystem change notifications";
|
private const string LabelDisableNotifications = "Disable filesystem change notifications";
|
||||||
private const string LabelEnableHttpApi = "Enable HTTP API";
|
private const string LabelEnableHttpApi = "Enable HTTP API";
|
||||||
private const string LabelReloadResource = "Reload Player Resource";
|
private const string LabelReloadResource = "Reload Player Resource";
|
||||||
|
private const string LabelManageModsOffset = "\"Manage mods\" title screen button offset";
|
||||||
|
|
||||||
private readonly SettingsInterface _base;
|
private readonly SettingsInterface _base;
|
||||||
private readonly Configuration _config;
|
private readonly Configuration _config;
|
||||||
|
|
@ -159,6 +160,17 @@ namespace Penumbra.UI
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void DrawManageModsButtonOffset()
|
||||||
|
{
|
||||||
|
var manageModsButtonOffset = _config.ManageModsButtonOffset;
|
||||||
|
ImGui.SetNextItemWidth( 150f );
|
||||||
|
if( ImGui.DragFloat2( LabelManageModsOffset, ref manageModsButtonOffset, 1f ) )
|
||||||
|
{
|
||||||
|
_config.ManageModsButtonOffset = manageModsButtonOffset;
|
||||||
|
_configChanged = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void DrawSortFoldersFirstBox()
|
private void DrawSortFoldersFirstBox()
|
||||||
{
|
{
|
||||||
var foldersFirst = _config.SortFoldersFirst;
|
var foldersFirst = _config.SortFoldersFirst;
|
||||||
|
|
@ -305,6 +317,7 @@ namespace Penumbra.UI
|
||||||
ImGuiCustom.VerticalDistance( DefaultVerticalSpace );
|
ImGuiCustom.VerticalDistance( DefaultVerticalSpace );
|
||||||
DrawScaleModSelectorBox();
|
DrawScaleModSelectorBox();
|
||||||
DrawSortFoldersFirstBox();
|
DrawSortFoldersFirstBox();
|
||||||
|
DrawManageModsButtonOffset();
|
||||||
DrawShowAdvancedBox();
|
DrawShowAdvancedBox();
|
||||||
|
|
||||||
if( _config.ShowAdvanced )
|
if( _config.ShowAdvanced )
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue