mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-15 21:24:18 +01:00
Add a bunch of help texts and expand on information.
This commit is contained in:
parent
3e5ea0d89c
commit
7f9ca5db76
10 changed files with 505 additions and 390 deletions
|
|
@ -32,6 +32,7 @@ namespace Penumbra
|
||||||
public string ForcedCollection { get; set; } = "";
|
public string ForcedCollection { get; set; } = "";
|
||||||
|
|
||||||
public bool SortFoldersFirst { get; set; } = false;
|
public bool SortFoldersFirst { get; set; } = false;
|
||||||
|
public bool HasReadCharacterCollectionDesc { get; set; } = false;
|
||||||
|
|
||||||
public Dictionary< string, string > CharacterCollections { get; set; } = new();
|
public Dictionary< string, string > CharacterCollections { get; set; } = new();
|
||||||
public Dictionary< string, string > ModSortOrder { get; set; } = new();
|
public Dictionary< string, string > ModSortOrder { get; set; } = new();
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ namespace Penumbra.Interop
|
||||||
}
|
}
|
||||||
|
|
||||||
// Forces the reload of a specific set of 85 files, notably containing the eqp, eqdp, gmp and est tables, by filename.
|
// Forces the reload of a specific set of 85 files, notably containing the eqp, eqdp, gmp and est tables, by filename.
|
||||||
public unsafe void ReloadPlayerResources()
|
public unsafe void ReloadResidentResources()
|
||||||
{
|
{
|
||||||
ReloadCharacterResources();
|
ReloadCharacterResources();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ namespace Penumbra.Meta
|
||||||
ClearDirectory();
|
ClearDirectory();
|
||||||
if( reload )
|
if( reload )
|
||||||
{
|
{
|
||||||
_resourceManagement.ReloadPlayerResources();
|
_resourceManagement.ReloadResidentResources();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ public class CollectionManager
|
||||||
if( ActiveCollection.Cache?.MetaManipulations.Count > 0 || newActive.Cache?.MetaManipulations.Count > 0 )
|
if( ActiveCollection.Cache?.MetaManipulations.Count > 0 || newActive.Cache?.MetaManipulations.Count > 0 )
|
||||||
{
|
{
|
||||||
var resourceManager = Service< ResidentResources >.Get();
|
var resourceManager = Service< ResidentResources >.Get();
|
||||||
resourceManager.ReloadPlayerResources();
|
resourceManager.ReloadResidentResources();
|
||||||
}
|
}
|
||||||
|
|
||||||
ActiveCollection = newActive;
|
ActiveCollection = newActive;
|
||||||
|
|
@ -111,7 +111,7 @@ public class CollectionManager
|
||||||
|
|
||||||
if( reloadMeta && ActiveCollection.Settings.TryGetValue( mod.BasePath.Name, out var config ) && config.Enabled )
|
if( reloadMeta && ActiveCollection.Settings.TryGetValue( mod.BasePath.Name, out var config ) && config.Enabled )
|
||||||
{
|
{
|
||||||
Service< ResidentResources >.Get().ReloadPlayerResources();
|
Service< ResidentResources >.Get().ReloadResidentResources();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -221,7 +221,7 @@ public class CollectionManager
|
||||||
{
|
{
|
||||||
ActiveCollection = c;
|
ActiveCollection = c;
|
||||||
var resourceManager = Service< ResidentResources >.Get();
|
var resourceManager = Service< ResidentResources >.Get();
|
||||||
resourceManager.ReloadPlayerResources();
|
resourceManager.ReloadResidentResources();
|
||||||
}
|
}
|
||||||
|
|
||||||
DefaultCollection = c;
|
DefaultCollection = c;
|
||||||
|
|
@ -242,7 +242,7 @@ public class CollectionManager
|
||||||
{
|
{
|
||||||
ActiveCollection = c;
|
ActiveCollection = c;
|
||||||
var resourceManager = Service< ResidentResources >.Get();
|
var resourceManager = Service< ResidentResources >.Get();
|
||||||
resourceManager.ReloadPlayerResources();
|
resourceManager.ReloadResidentResources();
|
||||||
}
|
}
|
||||||
|
|
||||||
CharacterCollection[ characterName ] = c;
|
CharacterCollection[ characterName ] = c;
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,7 @@ namespace Penumbra.Mods
|
||||||
Cache.UpdateMetaManipulations();
|
Cache.UpdateMetaManipulations();
|
||||||
if( activeCollection )
|
if( activeCollection )
|
||||||
{
|
{
|
||||||
Service< ResidentResources >.Get().ReloadPlayerResources();
|
Service< ResidentResources >.Get().ReloadResidentResources();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ namespace Penumbra
|
||||||
ResourceLoader.Init();
|
ResourceLoader.Init();
|
||||||
ResourceLoader.Enable();
|
ResourceLoader.Enable();
|
||||||
|
|
||||||
gameUtils.ReloadPlayerResources();
|
gameUtils.ReloadResidentResources();
|
||||||
|
|
||||||
SettingsInterface = new SettingsInterface( this );
|
SettingsInterface = new SettingsInterface( this );
|
||||||
|
|
||||||
|
|
@ -98,7 +98,7 @@ namespace Penumbra
|
||||||
}
|
}
|
||||||
|
|
||||||
Config.IsEnabled = true;
|
Config.IsEnabled = true;
|
||||||
Service< ResidentResources >.Get().ReloadPlayerResources();
|
Service< ResidentResources >.Get().ReloadResidentResources();
|
||||||
if( Config.EnablePlayerWatch )
|
if( Config.EnablePlayerWatch )
|
||||||
{
|
{
|
||||||
PlayerWatcher.SetStatus( true );
|
PlayerWatcher.SetStatus( true );
|
||||||
|
|
@ -117,7 +117,7 @@ namespace Penumbra
|
||||||
}
|
}
|
||||||
|
|
||||||
Config.IsEnabled = false;
|
Config.IsEnabled = false;
|
||||||
Service< ResidentResources >.Get().ReloadPlayerResources();
|
Service< ResidentResources >.Get().ReloadResidentResources();
|
||||||
if( Config.EnablePlayerWatch )
|
if( Config.EnablePlayerWatch )
|
||||||
{
|
{
|
||||||
PlayerWatcher.SetStatus( false );
|
PlayerWatcher.SetStatus( false );
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
using Dalamud.Interface;
|
using Dalamud.Interface;
|
||||||
|
using Dalamud.Interface.Components;
|
||||||
using Dalamud.Logging;
|
using Dalamud.Logging;
|
||||||
using ImGuiNET;
|
using ImGuiNET;
|
||||||
using Penumbra.Mod;
|
using Penumbra.Mod;
|
||||||
|
|
@ -10,13 +11,13 @@ using Penumbra.Mods;
|
||||||
using Penumbra.UI.Custom;
|
using Penumbra.UI.Custom;
|
||||||
using Penumbra.Util;
|
using Penumbra.Util;
|
||||||
|
|
||||||
namespace Penumbra.UI
|
namespace Penumbra.UI;
|
||||||
{
|
|
||||||
public partial class SettingsInterface
|
public partial class SettingsInterface
|
||||||
{
|
{
|
||||||
private class TabCollections
|
private class TabCollections
|
||||||
{
|
{
|
||||||
public const string LabelCurrentCollection = "Current Collection";
|
private const string CharacterCollectionHelpPopup = "Character Collection Information";
|
||||||
private readonly Selector _selector;
|
private readonly Selector _selector;
|
||||||
private readonly ModManager _manager;
|
private readonly ModManager _manager;
|
||||||
private string _collectionNames = null!;
|
private string _collectionNames = null!;
|
||||||
|
|
@ -109,7 +110,12 @@ namespace Penumbra.UI
|
||||||
|
|
||||||
private void DrawNewCollectionInput()
|
private void DrawNewCollectionInput()
|
||||||
{
|
{
|
||||||
ImGui.InputTextWithHint( "##New Collection", "New Collection", ref _newCollectionName, 64 );
|
ImGui.SetNextItemWidth( SettingsMenu.InputTextWidth );
|
||||||
|
ImGui.InputTextWithHint( "##New Collection", "New Collection Name", ref _newCollectionName, 64 );
|
||||||
|
ImGui.SameLine();
|
||||||
|
ImGuiComponents.HelpMarker(
|
||||||
|
"A collection is a set of settings for your installed mods, including their enabled status, their priorities and their mod-specific configuration.\n"
|
||||||
|
+ "You can use multiple collections to quickly switch between sets of mods." );
|
||||||
|
|
||||||
using var style = ImGuiRaii.PushStyle( ImGuiStyleVar.Alpha, 0.5f, _newCollectionName.Length == 0 );
|
using var style = ImGuiRaii.PushStyle( ImGuiStyleVar.Alpha, 0.5f, _newCollectionName.Length == 0 );
|
||||||
|
|
||||||
|
|
@ -118,13 +124,20 @@ namespace Penumbra.UI
|
||||||
CreateNewCollection( new Dictionary< string, ModSettings >() );
|
CreateNewCollection( new Dictionary< string, ModSettings >() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var hover = ImGui.IsItemHovered();
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
if( ImGui.Button( "Duplicate Current Collection" ) && _newCollectionName.Length > 0 )
|
if( ImGui.Button( "Duplicate Current Collection" ) && _newCollectionName.Length > 0 )
|
||||||
{
|
{
|
||||||
CreateNewCollection( _manager.Collections.CurrentCollection.Settings );
|
CreateNewCollection( _manager.Collections.CurrentCollection.Settings );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hover |= ImGui.IsItemHovered();
|
||||||
|
|
||||||
style.Pop();
|
style.Pop();
|
||||||
|
if( _newCollectionName.Length == 0 && hover )
|
||||||
|
{
|
||||||
|
ImGui.SetTooltip( "Please enter a name before creating a collection." );
|
||||||
|
}
|
||||||
|
|
||||||
var deleteCondition = _manager.Collections.Collections.Count > 1
|
var deleteCondition = _manager.Collections.Collections.Count > 1
|
||||||
&& _manager.Collections.CurrentCollection.Name != ModCollection.DefaultCollection;
|
&& _manager.Collections.CurrentCollection.Name != ModCollection.DefaultCollection;
|
||||||
|
|
@ -136,6 +149,11 @@ namespace Penumbra.UI
|
||||||
UpdateNames();
|
UpdateNames();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( !deleteCondition )
|
||||||
|
{
|
||||||
|
ImGuiCustom.HoverTooltip( "You can not delete the default collection." );
|
||||||
|
}
|
||||||
|
|
||||||
if( Penumbra.Config.ShowAdvanced )
|
if( Penumbra.Config.ShowAdvanced )
|
||||||
{
|
{
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
|
|
@ -171,8 +189,10 @@ namespace Penumbra.UI
|
||||||
public void DrawCurrentCollectionSelector( bool tooltip )
|
public void DrawCurrentCollectionSelector( bool tooltip )
|
||||||
{
|
{
|
||||||
var index = _currentCollectionIndex;
|
var index = _currentCollectionIndex;
|
||||||
var combo = ImGui.Combo( LabelCurrentCollection, ref index, _collectionNames );
|
ImGui.SetNextItemWidth( SettingsMenu.InputTextWidth );
|
||||||
ImGuiCustom.HoverTooltip(
|
var combo = ImGui.Combo( "Current Collection", ref index, _collectionNames );
|
||||||
|
ImGui.SameLine();
|
||||||
|
ImGuiComponents.HelpMarker(
|
||||||
"This collection will be modified when using the Installed Mods tab and making changes. It does not apply to anything by itself." );
|
"This collection will be modified when using the Installed Mods tab and making changes. It does not apply to anything by itself." );
|
||||||
|
|
||||||
if( combo )
|
if( combo )
|
||||||
|
|
@ -184,18 +204,18 @@ namespace Penumbra.UI
|
||||||
private void DrawDefaultCollectionSelector()
|
private void DrawDefaultCollectionSelector()
|
||||||
{
|
{
|
||||||
var index = _currentDefaultIndex;
|
var index = _currentDefaultIndex;
|
||||||
|
ImGui.SetNextItemWidth( SettingsMenu.InputTextWidth );
|
||||||
if( ImGui.Combo( "##Default Collection", ref index, _collectionNamesWithNone ) && index != _currentDefaultIndex )
|
if( ImGui.Combo( "##Default Collection", ref index, _collectionNamesWithNone ) && index != _currentDefaultIndex )
|
||||||
{
|
{
|
||||||
_manager.Collections.SetDefaultCollection( _collections[ index ] );
|
_manager.Collections.SetDefaultCollection( _collections[ index ] );
|
||||||
_currentDefaultIndex = index;
|
_currentDefaultIndex = index;
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGuiCustom.HoverTooltip(
|
ImGui.SameLine();
|
||||||
|
ImGuiComponents.HelpMarker(
|
||||||
"Mods in the default collection are loaded for any character that is not explicitly named in the character collections below.\n"
|
"Mods in the default collection are loaded for any character that is not explicitly named in the character collections below.\n"
|
||||||
+ "They also take precedence before the forced collection." );
|
+ "They also take precedence before the forced collection." );
|
||||||
|
|
||||||
ImGui.SameLine();
|
|
||||||
ImGuiHelpers.ScaledDummy( 24, 0 );
|
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
ImGui.Text( "Default Collection" );
|
ImGui.Text( "Default Collection" );
|
||||||
}
|
}
|
||||||
|
|
@ -203,37 +223,111 @@ namespace Penumbra.UI
|
||||||
private void DrawForcedCollectionSelector()
|
private void DrawForcedCollectionSelector()
|
||||||
{
|
{
|
||||||
var index = _currentForcedIndex;
|
var index = _currentForcedIndex;
|
||||||
if( ImGui.Combo( "##Forced Collection", ref index, _collectionNamesWithNone ) && index != _currentForcedIndex )
|
ImGui.SetNextItemWidth( SettingsMenu.InputTextWidth );
|
||||||
|
using var style = ImGuiRaii.PushStyle( ImGuiStyleVar.Alpha, 0.5f, _manager.Collections.CharacterCollection.Count == 0 );
|
||||||
|
if( ImGui.Combo( "##Forced Collection", ref index, _collectionNamesWithNone )
|
||||||
|
&& index != _currentForcedIndex
|
||||||
|
&& _manager.Collections.CharacterCollection.Count > 0 )
|
||||||
{
|
{
|
||||||
_manager.Collections.SetForcedCollection( _collections[ index ] );
|
_manager.Collections.SetForcedCollection( _collections[ index ] );
|
||||||
_currentForcedIndex = index;
|
_currentForcedIndex = index;
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGuiCustom.HoverTooltip(
|
style.Pop();
|
||||||
"Mods in the forced collection are always loaded if not overwritten by anything in the current or character-based collection.\n"
|
if( _manager.Collections.CharacterCollection.Count == 0 && ImGui.IsItemHovered() )
|
||||||
+ "Please avoid mixing meta-manipulating mods in Forced and other collections, as this will probably not work correctly." );
|
{
|
||||||
|
ImGui.SetTooltip(
|
||||||
|
"Forced Collections only provide value if you have at least one Character Collection. There is no need to set one until then." );
|
||||||
|
}
|
||||||
|
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
ImGuiHelpers.ScaledDummy( 24, 0 );
|
ImGuiComponents.HelpMarker(
|
||||||
|
"Mods in the forced collection are always loaded if not overwritten by anything in the current or character-based collection.\n"
|
||||||
|
+ "Please avoid mixing meta-manipulating mods in Forced and other collections, as this will probably not work correctly." );
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
ImGui.Text( "Forced Collection" );
|
ImGui.Text( "Forced Collection" );
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DrawNewCharacterCollection()
|
private void DrawNewCharacterCollection()
|
||||||
{
|
{
|
||||||
|
ImGui.SetNextItemWidth( SettingsMenu.InputTextWidth );
|
||||||
ImGui.InputTextWithHint( "##New Character", "New Character Name", ref _newCharacterName, 32 );
|
ImGui.InputTextWithHint( "##New Character", "New Character Name", ref _newCharacterName, 32 );
|
||||||
|
ImGui.SameLine();
|
||||||
|
ImGuiComponents.HelpMarker( "Click Me for Information!" );
|
||||||
|
ImGui.OpenPopupOnItemClick( CharacterCollectionHelpPopup, ImGuiPopupFlags.MouseButtonLeft );
|
||||||
|
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
if( ImGuiCustom.DisableButton( "Create New Character Collection", _newCharacterName.Length > 0 ) )
|
if( ImGuiCustom.DisableButton( "Create New Character Collection",
|
||||||
|
_newCharacterName.Length > 0 && Penumbra.Config.HasReadCharacterCollectionDesc ) )
|
||||||
{
|
{
|
||||||
_manager.Collections.CreateCharacterCollection( _newCharacterName );
|
_manager.Collections.CreateCharacterCollection( _newCharacterName );
|
||||||
_currentCharacterIndices[ _newCharacterName ] = 0;
|
_currentCharacterIndices[ _newCharacterName ] = 0;
|
||||||
_newCharacterName = string.Empty;
|
_newCharacterName = string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGuiCustom.HoverTooltip(
|
ImGuiCustom.HoverTooltip( "Please enter a Character name before creating the collection.\n"
|
||||||
"A character collection will be used whenever you manually redraw a character with the Name you have set up.\n"
|
+ "You also need to have read the help text for character collections." );
|
||||||
+ "If you enable automatic character redraws in the Settings tab, penumbra will try to use Character collections for corresponding characters automatically.\n" );
|
|
||||||
|
DrawCharacterCollectionHelp();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void DrawCharacterCollectionHelp()
|
||||||
|
{
|
||||||
|
var size = new Vector2( 700 * ImGuiHelpers.GlobalScale, 34 * ImGui.GetTextLineHeightWithSpacing() );
|
||||||
|
ImGui.SetNextWindowPos( ImGui.GetMainViewport().GetCenter(), ImGuiCond.Appearing, Vector2.One / 2 );
|
||||||
|
ImGui.SetNextWindowSize( size, ImGuiCond.Appearing );
|
||||||
|
var _ = true;
|
||||||
|
if( ImGui.BeginPopupModal( CharacterCollectionHelpPopup, ref _, ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoMove ) )
|
||||||
|
{
|
||||||
|
const string header = "Character Collections are a Hack! Use them at your own risk.";
|
||||||
|
using var end = ImGuiRaii.DeferredEnd( ImGui.EndPopup );
|
||||||
|
var textWidth = ImGui.CalcTextSize( header ).X;
|
||||||
|
ImGui.NewLine();
|
||||||
|
ImGui.SetCursorPosX( ( size.X - textWidth ) / 2 );
|
||||||
|
using var color = ImGuiRaii.PushColor( ImGuiCol.Text, 0xFF0000B8 );
|
||||||
|
ImGui.Text( header );
|
||||||
|
color.Pop();
|
||||||
|
ImGui.NewLine();
|
||||||
|
ImGui.TextWrapped(
|
||||||
|
"Character Collections are collections that get applied whenever the named character gets redrawn by Penumbra,"
|
||||||
|
+ " whether by a manual '/penumbra redraw' command, or by the automatic redrawing feature.\n"
|
||||||
|
+ "This means that they specifically require redrawing of a character to even apply, and thus can not work with mods that modify something that does not depend on characters being drawn, such as:\n"
|
||||||
|
+ " - animations\n"
|
||||||
|
+ " - sounds\n"
|
||||||
|
+ " - most effects\n"
|
||||||
|
+ " - most ui elements.\n"
|
||||||
|
+ "They can also not work with actors that are not named, like the Character Preview or TryOn Actors, and they can not work in cutscenes, since redrawing in cutscenes would cancel all animations.\n"
|
||||||
|
+ "They also do not work with every character customization (like skin, tattoo, hair, etc. changes) since those are not always re-requested by the game on redrawing a player. They may work, they may not, you need to test it.\n"
|
||||||
|
+ "\n"
|
||||||
|
+ "Due to the nature of meta manipulating mods, you can not mix meta manipulations inside a Character (or the Default) collection with meta manipulations inside the Forced collection.\n"
|
||||||
|
+ "\n"
|
||||||
|
+ "To verify that you have actually read this, you need to hold control and shift while clicking the Understood button for it to take effect.\n"
|
||||||
|
+ "Due to the nature of redrawing being a hack, weird things (or maybe even crashes) may happen when using Character Collections. The way this works is:\n"
|
||||||
|
+ " - Penumbra queues a redraw of an actor.\n"
|
||||||
|
+ " - When the redraw queue reaches that actor, the actor gets undrawn (turned invisible).\n"
|
||||||
|
+ " - Penumbra checks the actors name and if it matches a Character Collection, it replaces the Default collection with that one.\n"
|
||||||
|
+ " - Penumbra triggers the redraw of that actor. The game requests files.\n"
|
||||||
|
+ " - Penumbra potentially redirects those file requests to the modded files in the active collection, which is either Default or Character. (Or, afterwards, Forced).\n"
|
||||||
|
+ " - The actor is drawn.\n"
|
||||||
|
+ " - Penumbra returns the active collection to the Default Collection.\n"
|
||||||
|
+ "If any of those steps fails, or if the file requests take too long, it may happen that a character is drawn with half of its models from the Default and the other half from the Character Collection, or a modded Model is loaded, but not its corresponding modded textures, which lets it stay invisible, or similar problems." );
|
||||||
|
|
||||||
|
var buttonSize = ImGuiHelpers.ScaledVector2( 150, 0 );
|
||||||
|
var offset = ( size.X - buttonSize.X ) / 2;
|
||||||
|
ImGui.SetCursorPos( new Vector2( offset, size.Y - 3 * ImGui.GetTextLineHeightWithSpacing() ) );
|
||||||
|
var state = ImGui.GetIO().KeyCtrl && ImGui.GetIO().KeyShift;
|
||||||
|
color.Push( ImGuiCol.ButtonHovered, 0xFF00A000, state );
|
||||||
|
if( ImGui.Button( "Understood!", buttonSize ) )
|
||||||
|
{
|
||||||
|
if( state && !Penumbra.Config.HasReadCharacterCollectionDesc )
|
||||||
|
{
|
||||||
|
Penumbra.Config.HasReadCharacterCollectionDesc = true;
|
||||||
|
Penumbra.Config.Save();
|
||||||
|
}
|
||||||
|
|
||||||
|
ImGui.CloseCurrentPopup();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -252,6 +346,7 @@ namespace Penumbra.UI
|
||||||
{
|
{
|
||||||
var idx = _currentCharacterIndices[ name ];
|
var idx = _currentCharacterIndices[ name ];
|
||||||
var tmp = idx;
|
var tmp = idx;
|
||||||
|
ImGui.SetNextItemWidth( SettingsMenu.InputTextWidth );
|
||||||
if( ImGui.Combo( $"##{name}collection", ref tmp, _collectionNamesWithNone ) && idx != tmp )
|
if( ImGui.Combo( $"##{name}collection", ref tmp, _collectionNamesWithNone ) && idx != tmp )
|
||||||
{
|
{
|
||||||
_manager.Collections.SetCharacterCollection( name, _collections[ tmp ] );
|
_manager.Collections.SetCharacterCollection( name, _collections[ tmp ] );
|
||||||
|
|
@ -261,11 +356,15 @@ namespace Penumbra.UI
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
|
|
||||||
using var font = ImGuiRaii.PushFont( UiBuilder.IconFont );
|
using var font = ImGuiRaii.PushFont( UiBuilder.IconFont );
|
||||||
|
|
||||||
|
using var style = ImGuiRaii.PushStyle( ImGuiStyleVar.FramePadding, Vector2.One * ImGuiHelpers.GlobalScale * 1.5f );
|
||||||
if( ImGui.Button( $"{FontAwesomeIcon.Trash.ToIconString()}##{name}" ) )
|
if( ImGui.Button( $"{FontAwesomeIcon.Trash.ToIconString()}##{name}" ) )
|
||||||
{
|
{
|
||||||
_manager.Collections.RemoveCharacterCollection( name );
|
_manager.Collections.RemoveCharacterCollection( name );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
style.Pop();
|
||||||
|
|
||||||
font.Pop();
|
font.Pop();
|
||||||
|
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
|
|
@ -299,4 +398,3 @@ namespace Penumbra.UI
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
@ -616,7 +616,7 @@ namespace Penumbra.UI
|
||||||
const float size = 200;
|
const float size = 200;
|
||||||
|
|
||||||
DrawModsSelectorFilter();
|
DrawModsSelectorFilter();
|
||||||
var textSize = ImGui.CalcTextSize( TabCollections.LabelCurrentCollection ).X + ImGui.GetStyle().ItemInnerSpacing.X;
|
var textSize = ImGui.CalcTextSize( "Current Collection" ).X + ImGui.GetStyle().ItemInnerSpacing.X;
|
||||||
var comboSize = size * ImGui.GetIO().FontGlobalScale;
|
var comboSize = size * ImGui.GetIO().FontGlobalScale;
|
||||||
var offset = comboSize + textSize;
|
var offset = comboSize + textSize;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,10 @@ using System.Linq;
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using Dalamud.Interface;
|
using Dalamud.Interface;
|
||||||
|
using Dalamud.Interface.Components;
|
||||||
using Dalamud.Logging;
|
using Dalamud.Logging;
|
||||||
using ImGuiNET;
|
using ImGuiNET;
|
||||||
using Penumbra.Interop;
|
using Penumbra.Interop;
|
||||||
using Penumbra.Mods;
|
|
||||||
using Penumbra.UI.Custom;
|
using Penumbra.UI.Custom;
|
||||||
using Penumbra.Util;
|
using Penumbra.Util;
|
||||||
|
|
||||||
|
|
@ -18,24 +18,6 @@ public partial class SettingsInterface
|
||||||
{
|
{
|
||||||
private class TabSettings
|
private class TabSettings
|
||||||
{
|
{
|
||||||
private const string LabelTab = "Settings";
|
|
||||||
private const string LabelRootFolder = "Root Folder";
|
|
||||||
private const string LabelTempFolder = "Temporary Folder";
|
|
||||||
private const string LabelRediscoverButton = "Rediscover Mods";
|
|
||||||
private const string LabelOpenFolder = "Open Mods Folder";
|
|
||||||
private const string LabelOpenTempFolder = "Open Temporary Folder";
|
|
||||||
private const string LabelEnabled = "Enable Mods";
|
|
||||||
private const string LabelEnabledPlayerWatch = "Enable automatic Character Redraws";
|
|
||||||
private const string LabelWaitFrames = "Wait Frames";
|
|
||||||
private const string LabelSortFoldersFirst = "Sort Mod Folders Before Mods";
|
|
||||||
private const string LabelScaleModSelector = "Scale Mod Selector With Window Size";
|
|
||||||
private const string LabelShowAdvanced = "Show Advanced Settings";
|
|
||||||
private const string LabelLogLoadedFiles = "Log all loaded files";
|
|
||||||
private const string LabelDisableNotifications = "Disable filesystem change notifications";
|
|
||||||
private const string LabelEnableHttpApi = "Enable HTTP API";
|
|
||||||
private const string LabelReloadResource = "Reload Player Resource";
|
|
||||||
private const string LabelManageModsOffset = "\"Manage mods\"-Button Offset";
|
|
||||||
|
|
||||||
private readonly SettingsInterface _base;
|
private readonly SettingsInterface _base;
|
||||||
private readonly Configuration _config;
|
private readonly Configuration _config;
|
||||||
private bool _configChanged;
|
private bool _configChanged;
|
||||||
|
|
@ -52,17 +34,46 @@ public partial class SettingsInterface
|
||||||
_newTempDirectory = _config.TempDirectory;
|
_newTempDirectory = _config.TempDirectory;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static bool DrawPressEnterWarning( string old, float? width = null )
|
private static bool DrawPressEnterWarning( string old )
|
||||||
{
|
{
|
||||||
const uint red = 0xFF202080;
|
const uint red = 0xFF202080;
|
||||||
using var color = ImGuiRaii.PushColor( ImGuiCol.Button, red );
|
using var color = ImGuiRaii.PushColor( ImGuiCol.Button, red );
|
||||||
var w = Vector2.UnitX * ( width ?? ImGui.CalcItemWidth() );
|
var w = Vector2.UnitX * ImGui.CalcItemWidth();
|
||||||
return ImGui.Button( $"Press Enter or Click Here to Save (Current Directory: {old})", w );
|
return ImGui.Button( $"Press Enter or Click Here to Save (Current Directory: {old})", w );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void DrawOpenDirectoryButton( int id, DirectoryInfo directory, bool condition )
|
||||||
|
{
|
||||||
|
ImGui.PushID( id );
|
||||||
|
var ret = ImGui.Button( "Open Directory" );
|
||||||
|
ImGuiCustom.HoverTooltip( "Open this directory in your configured file explorer." );
|
||||||
|
if( ret && condition && Directory.Exists( directory.FullName ) )
|
||||||
|
{
|
||||||
|
Process.Start( new ProcessStartInfo( directory.FullName )
|
||||||
|
{
|
||||||
|
UseShellExecute = true,
|
||||||
|
} );
|
||||||
|
}
|
||||||
|
|
||||||
|
ImGui.PopID();
|
||||||
|
}
|
||||||
|
|
||||||
private void DrawRootFolder()
|
private void DrawRootFolder()
|
||||||
{
|
{
|
||||||
var save = ImGui.InputText( LabelRootFolder, ref _newModDirectory, 255, ImGuiInputTextFlags.EnterReturnsTrue );
|
ImGui.BeginGroup();
|
||||||
|
ImGui.SetNextItemWidth( SettingsMenu.InputTextWidth );
|
||||||
|
var save = ImGui.InputText( "Root Directory", ref _newModDirectory, 255, ImGuiInputTextFlags.EnterReturnsTrue );
|
||||||
|
ImGui.SameLine();
|
||||||
|
ImGuiComponents.HelpMarker( "This is where Penumbra will store your extracted mod files.\n"
|
||||||
|
+ "TTMP files are not copied, just extracted.\n"
|
||||||
|
+ "This directory needs to be accessible and you need write access here.\n"
|
||||||
|
+ "It is recommended that this directory is placed on a fast hard drive, preferably an SSD.\n"
|
||||||
|
+ "It should also be placed near the root of a logical drive - the shorter the total path to this folder, the better.\n"
|
||||||
|
+ "Definitely do not place it in your Dalamud directory or any sub-directory thereof." );
|
||||||
|
ImGui.SameLine();
|
||||||
|
DrawOpenDirectoryButton( 0, _base._modManager.BasePath, _base._modManager.Valid );
|
||||||
|
ImGui.EndGroup();
|
||||||
|
|
||||||
if( _config.ModDirectory == _newModDirectory || !_newModDirectory.Any() )
|
if( _config.ModDirectory == _newModDirectory || !_newModDirectory.Any() )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|
@ -79,36 +90,24 @@ public partial class SettingsInterface
|
||||||
|
|
||||||
private void DrawTempFolder()
|
private void DrawTempFolder()
|
||||||
{
|
{
|
||||||
ImGui.SetNextItemWidth( 400 * ImGuiHelpers.GlobalScale );
|
|
||||||
ImGui.BeginGroup();
|
ImGui.BeginGroup();
|
||||||
var save = ImGui.InputText( LabelTempFolder, ref _newTempDirectory, 255, ImGuiInputTextFlags.EnterReturnsTrue );
|
ImGui.SetNextItemWidth( SettingsMenu.InputTextWidth );
|
||||||
|
var save = ImGui.InputText( "Temp Directory", ref _newTempDirectory, 255, ImGuiInputTextFlags.EnterReturnsTrue );
|
||||||
ImGuiCustom.HoverTooltip( "The folder used to store temporary meta manipulation files.\n"
|
|
||||||
+ "Leave this blank if you have no reason not to.\n"
|
|
||||||
+ "A folder 'penumbrametatmp' will be created as a subdirectory to the specified directory.\n"
|
|
||||||
+ "If none is specified (i.e. this is blank) this folder will be created in the root folder instead." );
|
|
||||||
|
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
if( ImGui.Button( LabelOpenTempFolder ) )
|
ImGuiComponents.HelpMarker( "This is where Penumbra will store temporary meta manipulation files.\n"
|
||||||
{
|
+ "Leave this blank if you have no reason not to.\n"
|
||||||
if( !Directory.Exists( _base._modManager.TempPath.FullName ) || !_base._modManager.TempWritable )
|
+ "A directory 'penumbrametatmp' will be created as a sub-directory to the specified directory.\n"
|
||||||
{
|
+ "If none is specified (i.e. this is blank) this directory will be created in the root directory instead.\n" );
|
||||||
return;
|
ImGui.SameLine();
|
||||||
}
|
DrawOpenDirectoryButton( 1, _base._modManager.TempPath, _base._modManager.TempWritable );
|
||||||
|
|
||||||
Process.Start( new ProcessStartInfo( _base._modManager.TempPath.FullName )
|
|
||||||
{
|
|
||||||
UseShellExecute = true,
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui.EndGroup();
|
ImGui.EndGroup();
|
||||||
|
|
||||||
if( _newTempDirectory == _config.TempDirectory )
|
if( _newTempDirectory == _config.TempDirectory )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( save || DrawPressEnterWarning( _config.TempDirectory, 400 ) )
|
if( save || DrawPressEnterWarning( _config.TempDirectory ) )
|
||||||
{
|
{
|
||||||
_base._modManager.SetTempDirectory( _newTempDirectory );
|
_base._modManager.SetTempDirectory( _newTempDirectory );
|
||||||
_newTempDirectory = _config.TempDirectory;
|
_newTempDirectory = _config.TempDirectory;
|
||||||
|
|
@ -117,34 +116,21 @@ public partial class SettingsInterface
|
||||||
|
|
||||||
private void DrawRediscoverButton()
|
private void DrawRediscoverButton()
|
||||||
{
|
{
|
||||||
if( ImGui.Button( LabelRediscoverButton ) )
|
if( ImGui.Button( "Rediscover Mods" ) )
|
||||||
{
|
{
|
||||||
_base._menu.InstalledTab.Selector.ClearSelection();
|
_base._menu.InstalledTab.Selector.ClearSelection();
|
||||||
_base._modManager.DiscoverMods();
|
_base._modManager.DiscoverMods();
|
||||||
_base._menu.InstalledTab.Selector.Cache.TriggerListReset();
|
_base._menu.InstalledTab.Selector.Cache.TriggerListReset();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void DrawOpenModsButton()
|
ImGui.SameLine();
|
||||||
{
|
ImGuiComponents.HelpMarker( "Force Penumbra to completely re-scan your root directory as if it was restarted." );
|
||||||
if( ImGui.Button( LabelOpenFolder ) )
|
|
||||||
{
|
|
||||||
if( !Directory.Exists( _config.ModDirectory ) || !Service< ModManager >.Get().Valid )
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Process.Start( new ProcessStartInfo( _config.ModDirectory )
|
|
||||||
{
|
|
||||||
UseShellExecute = true,
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DrawEnabledBox()
|
private void DrawEnabledBox()
|
||||||
{
|
{
|
||||||
var enabled = _config.IsEnabled;
|
var enabled = _config.IsEnabled;
|
||||||
if( ImGui.Checkbox( LabelEnabled, ref enabled ) )
|
if( ImGui.Checkbox( "Enable Mods", ref enabled ) )
|
||||||
{
|
{
|
||||||
_base._penumbra.SetEnabled( enabled );
|
_base._penumbra.SetEnabled( enabled );
|
||||||
}
|
}
|
||||||
|
|
@ -153,53 +139,68 @@ public partial class SettingsInterface
|
||||||
private void DrawShowAdvancedBox()
|
private void DrawShowAdvancedBox()
|
||||||
{
|
{
|
||||||
var showAdvanced = _config.ShowAdvanced;
|
var showAdvanced = _config.ShowAdvanced;
|
||||||
if( ImGui.Checkbox( LabelShowAdvanced, ref showAdvanced ) )
|
if( ImGui.Checkbox( "Show Advanced Settings", ref showAdvanced ) )
|
||||||
{
|
{
|
||||||
_config.ShowAdvanced = showAdvanced;
|
_config.ShowAdvanced = showAdvanced;
|
||||||
_configChanged = true;
|
_configChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImGui.SameLine();
|
||||||
|
ImGuiComponents.HelpMarker( "Enable some advanced options in this window and in the mod selector.\n"
|
||||||
|
+ "This is required to enable manually editing any mod information." );
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DrawManageModsButtonOffsetButton()
|
private void DrawManageModsButtonOffsetButton()
|
||||||
{
|
{
|
||||||
var manageModsButtonOffset = _config.ManageModsButtonOffset;
|
var manageModsButtonOffset = _config.ManageModsButtonOffset;
|
||||||
ImGui.SetNextItemWidth( 150 * ImGuiHelpers.GlobalScale );
|
ImGui.SetNextItemWidth( 150 * ImGuiHelpers.GlobalScale );
|
||||||
if( ImGui.DragFloat2( LabelManageModsOffset, ref manageModsButtonOffset, 1f ) )
|
if( ImGui.DragFloat2( "\"Manage Mods\"-Button Offset", ref manageModsButtonOffset, 1f ) )
|
||||||
{
|
{
|
||||||
_config.ManageModsButtonOffset = manageModsButtonOffset;
|
_config.ManageModsButtonOffset = manageModsButtonOffset;
|
||||||
_configChanged = true;
|
_configChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
_base._manageModsButton.ForceDraw = ImGui.IsItemActive();
|
_base._manageModsButton.ForceDraw = ImGui.IsItemActive();
|
||||||
|
ImGuiComponents.HelpMarker(
|
||||||
|
"Shift the \"Manage Mods\"-Button displayed in the login-lobby by the given amount of pixels in X/Y-direction." );
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DrawSortFoldersFirstBox()
|
private void DrawSortFoldersFirstBox()
|
||||||
{
|
{
|
||||||
var foldersFirst = _config.SortFoldersFirst;
|
var foldersFirst = _config.SortFoldersFirst;
|
||||||
if( ImGui.Checkbox( LabelSortFoldersFirst, ref foldersFirst ) )
|
if( ImGui.Checkbox( "Sort Mod-Folders Before Mods", ref foldersFirst ) )
|
||||||
{
|
{
|
||||||
_config.SortFoldersFirst = foldersFirst;
|
_config.SortFoldersFirst = foldersFirst;
|
||||||
_base._menu.InstalledTab.Selector.Cache.TriggerListReset();
|
_base._menu.InstalledTab.Selector.Cache.TriggerListReset();
|
||||||
_configChanged = true;
|
_configChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImGui.SameLine();
|
||||||
|
ImGuiComponents.HelpMarker(
|
||||||
|
"Prioritizes all mod-folders in the mod-selector in the Installed Mods tab so that folders come before single mods, instead of being sorted completely alphabetically" );
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DrawScaleModSelectorBox()
|
private void DrawScaleModSelectorBox()
|
||||||
{
|
{
|
||||||
var scaleModSelector = _config.ScaleModSelector;
|
var scaleModSelector = _config.ScaleModSelector;
|
||||||
if( ImGui.Checkbox( LabelScaleModSelector, ref scaleModSelector ) )
|
if( ImGui.Checkbox( "Scale Mod Selector With Window Size", ref scaleModSelector ) )
|
||||||
{
|
{
|
||||||
_config.ScaleModSelector = scaleModSelector;
|
_config.ScaleModSelector = scaleModSelector;
|
||||||
_configChanged = true;
|
_configChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImGui.SameLine();
|
||||||
|
ImGuiComponents.HelpMarker(
|
||||||
|
"Instead of keeping the mod-selector in the Installed Mods tab a fixed width, this will let it scale with the total size of the Penumbra window." );
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DrawLogLoadedFilesBox()
|
private void DrawLogLoadedFilesBox()
|
||||||
{
|
{
|
||||||
ImGui.Checkbox( LabelLogLoadedFiles, ref _base._penumbra.ResourceLoader.LogAllFiles );
|
ImGui.Checkbox( "Log Loaded Files", ref _base._penumbra.ResourceLoader.LogAllFiles );
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
var regex = _base._penumbra.ResourceLoader.LogFileFilter?.ToString() ?? string.Empty;
|
var regex = _base._penumbra.ResourceLoader.LogFileFilter?.ToString() ?? string.Empty;
|
||||||
var tmp = regex;
|
var tmp = regex;
|
||||||
|
ImGui.SetNextItemWidth( SettingsMenu.InputTextWidth );
|
||||||
if( ImGui.InputTextWithHint( "##LogFilter", "Matching this Regex...", ref tmp, 64 ) && tmp != regex )
|
if( ImGui.InputTextWithHint( "##LogFilter", "Matching this Regex...", ref tmp, 64 ) && tmp != regex )
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|
@ -212,22 +213,28 @@ public partial class SettingsInterface
|
||||||
PluginLog.Debug( "Could not create regex:\n{Exception}", e );
|
PluginLog.Debug( "Could not create regex:\n{Exception}", e );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImGui.SameLine();
|
||||||
|
ImGuiComponents.HelpMarker( "Log all loaded files that match the given Regex to the PluginLog." );
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DrawDisableNotificationsBox()
|
private void DrawDisableNotificationsBox()
|
||||||
{
|
{
|
||||||
var fsWatch = _config.DisableFileSystemNotifications;
|
var fsWatch = _config.DisableFileSystemNotifications;
|
||||||
if( ImGui.Checkbox( LabelDisableNotifications, ref fsWatch ) )
|
if( ImGui.Checkbox( "Disable Filesystem Change Notifications", ref fsWatch ) )
|
||||||
{
|
{
|
||||||
_config.DisableFileSystemNotifications = fsWatch;
|
_config.DisableFileSystemNotifications = fsWatch;
|
||||||
_configChanged = true;
|
_configChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImGui.SameLine();
|
||||||
|
ImGuiComponents.HelpMarker( "Currently does nothing." );
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DrawEnableHttpApiBox()
|
private void DrawEnableHttpApiBox()
|
||||||
{
|
{
|
||||||
var http = _config.EnableHttpApi;
|
var http = _config.EnableHttpApi;
|
||||||
if( ImGui.Checkbox( LabelEnableHttpApi, ref http ) )
|
if( ImGui.Checkbox( "Enable HTTP API", ref http ) )
|
||||||
{
|
{
|
||||||
if( http )
|
if( http )
|
||||||
{
|
{
|
||||||
|
|
@ -241,21 +248,25 @@ public partial class SettingsInterface
|
||||||
_config.EnableHttpApi = http;
|
_config.EnableHttpApi = http;
|
||||||
_configChanged = true;
|
_configChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImGui.SameLine();
|
||||||
|
ImGuiComponents.HelpMarker( "Currently does nothing." );
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DrawEnabledPlayerWatcher()
|
private void DrawEnabledPlayerWatcher()
|
||||||
{
|
{
|
||||||
var enabled = _config.EnablePlayerWatch;
|
var enabled = _config.EnablePlayerWatch;
|
||||||
if( ImGui.Checkbox( LabelEnabledPlayerWatch, ref enabled ) )
|
if( ImGui.Checkbox( "Enable Automatic Character Redraws", ref enabled ) )
|
||||||
{
|
{
|
||||||
_config.EnablePlayerWatch = enabled;
|
_config.EnablePlayerWatch = enabled;
|
||||||
_configChanged = true;
|
_configChanged = true;
|
||||||
Penumbra.PlayerWatcher.SetStatus( enabled );
|
Penumbra.PlayerWatcher.SetStatus( enabled );
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGuiCustom.HoverTooltip(
|
ImGui.SameLine();
|
||||||
"If this setting is enabled, penumbra will keep tabs on characters that have a corresponding collection setup in the Collections tab.\n"
|
ImGuiComponents.HelpMarker(
|
||||||
+ "Penumbra will try to automatically redraw those characters using their collection when they first appear in an instance, or when they change their current equip." );
|
"If this setting is enabled, Penumbra will keep tabs on characters that have a corresponding character collection setup in the Collections tab.\n"
|
||||||
|
+ "Penumbra will try to automatically redraw those characters using their collection when they first appear in an instance, or when they change their current equip.\n" );
|
||||||
|
|
||||||
if( !_config.EnablePlayerWatch || !_config.ShowAdvanced )
|
if( !_config.EnablePlayerWatch || !_config.ShowAdvanced )
|
||||||
{
|
{
|
||||||
|
|
@ -264,28 +275,32 @@ public partial class SettingsInterface
|
||||||
|
|
||||||
var waitFrames = _config.WaitFrames;
|
var waitFrames = _config.WaitFrames;
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
ImGui.SetNextItemWidth( 50 );
|
ImGui.SetNextItemWidth( 50 * ImGuiHelpers.GlobalScale );
|
||||||
if( ImGui.InputInt( LabelWaitFrames, ref waitFrames, 0, 0 )
|
if( ImGui.InputInt( "Wait Frames", ref waitFrames, 0, 0 )
|
||||||
&& waitFrames != _config.WaitFrames
|
&& waitFrames != _config.WaitFrames
|
||||||
&& waitFrames > 0
|
&& waitFrames is > 0 and < 3000 )
|
||||||
&& waitFrames < 3000 )
|
|
||||||
{
|
{
|
||||||
_base._penumbra.ObjectReloader.DefaultWaitFrames = waitFrames;
|
_base._penumbra.ObjectReloader.DefaultWaitFrames = waitFrames;
|
||||||
_config.WaitFrames = waitFrames;
|
_config.WaitFrames = waitFrames;
|
||||||
_configChanged = true;
|
_configChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGuiCustom.HoverTooltip(
|
ImGui.SameLine();
|
||||||
|
ImGuiComponents.HelpMarker(
|
||||||
"The number of frames penumbra waits after some events (like zone changes) until it starts trying to redraw actors again, in a range of [1, 3001].\n"
|
"The number of frames penumbra waits after some events (like zone changes) until it starts trying to redraw actors again, in a range of [1, 3001].\n"
|
||||||
+ "Keep this as low as possible while producing stable results." );
|
+ "Keep this as low as possible while producing stable results." );
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void DrawReloadResourceButton()
|
private static void DrawReloadResourceButton()
|
||||||
{
|
{
|
||||||
if( ImGui.Button( LabelReloadResource ) )
|
if( ImGui.Button( "Reload Resident Resources" ) )
|
||||||
{
|
{
|
||||||
Service< ResidentResources >.Get().ReloadPlayerResources();
|
Service< ResidentResources >.Get().ReloadResidentResources();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImGui.SameLine();
|
||||||
|
ImGuiComponents.HelpMarker( "Reload some specific files that the game keeps in memory at all times.\n"
|
||||||
|
+ "You usually should not need to do this." );
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DrawAdvancedSettings()
|
private void DrawAdvancedSettings()
|
||||||
|
|
@ -299,7 +314,7 @@ public partial class SettingsInterface
|
||||||
|
|
||||||
public void Draw()
|
public void Draw()
|
||||||
{
|
{
|
||||||
if( !ImGui.BeginTabItem( LabelTab ) )
|
if( !ImGui.BeginTabItem( "Settings" ) )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -309,8 +324,6 @@ public partial class SettingsInterface
|
||||||
DrawRootFolder();
|
DrawRootFolder();
|
||||||
|
|
||||||
DrawRediscoverButton();
|
DrawRediscoverButton();
|
||||||
ImGui.SameLine();
|
|
||||||
DrawOpenModsButton();
|
|
||||||
|
|
||||||
ImGuiCustom.VerticalDistance( DefaultVerticalSpace );
|
ImGuiCustom.VerticalDistance( DefaultVerticalSpace );
|
||||||
DrawEnabledBox();
|
DrawEnabledBox();
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,19 @@
|
||||||
using System.Numerics;
|
using System.Numerics;
|
||||||
|
using Dalamud.Interface;
|
||||||
using ImGuiNET;
|
using ImGuiNET;
|
||||||
using Penumbra.Mods;
|
using Penumbra.Mods;
|
||||||
using Penumbra.UI.Custom;
|
using Penumbra.UI.Custom;
|
||||||
using Penumbra.Util;
|
using Penumbra.Util;
|
||||||
|
|
||||||
namespace Penumbra.UI
|
namespace Penumbra.UI;
|
||||||
{
|
|
||||||
public partial class SettingsInterface
|
public partial class SettingsInterface
|
||||||
{
|
{
|
||||||
private class SettingsMenu
|
private class SettingsMenu
|
||||||
{
|
{
|
||||||
|
public static float InputTextWidth
|
||||||
|
=> 450 * ImGuiHelpers.GlobalScale;
|
||||||
|
|
||||||
private const string PenumbraSettingsLabel = "PenumbraSettings";
|
private const string PenumbraSettingsLabel = "PenumbraSettings";
|
||||||
|
|
||||||
public static readonly Vector2 MinSettingsSize = new(800, 450);
|
public static readonly Vector2 MinSettingsSize = new(800, 450);
|
||||||
|
|
@ -89,4 +93,3 @@ namespace Penumbra.UI
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue