Merge branch 'pr/n79_master'

This commit is contained in:
Ottermandias 2021-11-29 16:24:33 +01:00
commit 5802f6b6d7
3 changed files with 17 additions and 2 deletions

View file

@ -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()
{ {

View file

@ -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 ) )

View file

@ -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;
@ -155,7 +156,18 @@ namespace Penumbra.UI
if( ImGui.Checkbox( LabelShowAdvanced, ref showAdvanced ) ) if( ImGui.Checkbox( LabelShowAdvanced, ref showAdvanced ) )
{ {
_config.ShowAdvanced = showAdvanced; _config.ShowAdvanced = showAdvanced;
_configChanged = true; _configChanged = true;
}
}
private void DrawManageModsButtonOffset()
{
var manageModsButtonOffset = _config.ManageModsButtonOffset;
ImGui.SetNextItemWidth( 150f );
if( ImGui.DragFloat2( LabelManageModsOffset, ref manageModsButtonOffset, 1f ) )
{
_config.ManageModsButtonOffset = manageModsButtonOffset;
_configChanged = true;
} }
} }
@ -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 )