mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 10:17:22 +01:00
Some style fixes.
This commit is contained in:
parent
d7214cd851
commit
d59869dbfe
6 changed files with 16 additions and 14 deletions
|
|
@ -14,7 +14,7 @@ namespace Penumbra.Mods
|
||||||
{
|
{
|
||||||
private readonly ModManager _manager;
|
private readonly ModManager _manager;
|
||||||
|
|
||||||
public string CollectionChangedTo { get; private set; }= string.Empty;
|
public string CollectionChangedTo { get; private set; } = string.Empty;
|
||||||
public Dictionary< string, ModCollection > Collections { get; } = new();
|
public Dictionary< string, ModCollection > Collections { get; } = new();
|
||||||
|
|
||||||
public ModCollection CurrentCollection { get; private set; } = null!;
|
public ModCollection CurrentCollection { get; private set; } = null!;
|
||||||
|
|
@ -43,11 +43,11 @@ namespace Penumbra.Mods
|
||||||
|
|
||||||
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.ReloadPlayerResources();
|
||||||
}
|
}
|
||||||
|
|
||||||
ActiveCollection = newActive;
|
ActiveCollection = newActive;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -192,7 +192,7 @@ namespace Penumbra.Mods
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MissingFiles.Add( file );
|
MissingFiles.Add( file );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ namespace Penumbra.Mods
|
||||||
|
|
||||||
private void ClearOldTmpDir()
|
private void ClearOldTmpDir()
|
||||||
{
|
{
|
||||||
if (!TempWritable)
|
if( !TempWritable )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ namespace Penumbra.UI
|
||||||
if( _manager.Collections.AddCollection( _newCollectionName, settings ) )
|
if( _manager.Collections.AddCollection( _newCollectionName, settings ) )
|
||||||
{
|
{
|
||||||
UpdateNames();
|
UpdateNames();
|
||||||
SetCurrentCollection( _manager.Collections.Collections[_newCollectionName], true );
|
SetCurrentCollection( _manager.Collections.Collections[ _newCollectionName ], true );
|
||||||
}
|
}
|
||||||
|
|
||||||
_newCollectionName = string.Empty;
|
_newCollectionName = string.Empty;
|
||||||
|
|
@ -100,10 +100,11 @@ namespace Penumbra.UI
|
||||||
{
|
{
|
||||||
var changes = ModFunctions.CleanUpCollection( _manager.Collections.CurrentCollection.Settings,
|
var changes = ModFunctions.CleanUpCollection( _manager.Collections.CurrentCollection.Settings,
|
||||||
_manager.BasePath.EnumerateDirectories() );
|
_manager.BasePath.EnumerateDirectories() );
|
||||||
_manager.Collections.CurrentCollection.UpdateSettings( forceSave: changes );
|
_manager.Collections.CurrentCollection.UpdateSettings( changes );
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGuiCustom.HoverTooltip( "Remove all stored settings for mods not currently available and fix invalid settings.\nUse at own risk." );
|
ImGuiCustom.HoverTooltip(
|
||||||
|
"Remove all stored settings for mods not currently available and fix invalid settings.\nUse at own risk." );
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DrawNewCollectionInput()
|
private void DrawNewCollectionInput()
|
||||||
|
|
@ -128,7 +129,7 @@ namespace Penumbra.UI
|
||||||
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;
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
if( ImGuiCustom.DisableButton( "Delete Current Collection", deleteCondition) )
|
if( ImGuiCustom.DisableButton( "Delete Current Collection", deleteCondition ) )
|
||||||
{
|
{
|
||||||
_manager.Collections.RemoveCollection( _manager.Collections.CurrentCollection.Name );
|
_manager.Collections.RemoveCollection( _manager.Collections.CurrentCollection.Name );
|
||||||
SetCurrentCollection( _manager.Collections.CurrentCollection, true );
|
SetCurrentCollection( _manager.Collections.CurrentCollection, true );
|
||||||
|
|
@ -149,7 +150,7 @@ namespace Penumbra.UI
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_manager.Collections.SetCurrentCollection( _collections[idx + 1] );
|
_manager.Collections.SetCurrentCollection( _collections[ idx + 1 ] );
|
||||||
_currentCollectionIndex = idx;
|
_currentCollectionIndex = idx;
|
||||||
_selector.Cache.TriggerListReset();
|
_selector.Cache.TriggerListReset();
|
||||||
if( _selector.Mod != null )
|
if( _selector.Mod != null )
|
||||||
|
|
@ -223,7 +224,7 @@ namespace Penumbra.UI
|
||||||
ImGui.InputTextWithHint( "##New Character", "New Character Name", ref _newCharacterName, 32 );
|
ImGui.InputTextWithHint( "##New Character", "New Character Name", ref _newCharacterName, 32 );
|
||||||
|
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
if( ImGuiCustom.DisableButton( "Create New Character Collection", _newCharacterName.Length > 0 ))
|
if( ImGuiCustom.DisableButton( "Create New Character Collection", _newCharacterName.Length > 0 ) )
|
||||||
{
|
{
|
||||||
_manager.Collections.CreateCharacterCollection( _newCharacterName );
|
_manager.Collections.CreateCharacterCollection( _newCharacterName );
|
||||||
_currentCharacterIndices[ _newCharacterName ] = 0;
|
_currentCharacterIndices[ _newCharacterName ] = 0;
|
||||||
|
|
|
||||||
|
|
@ -349,9 +349,9 @@ namespace Penumbra.UI
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var manager = Service<ModManager>.Get();
|
var manager = Service< ModManager >.Get();
|
||||||
var cache = manager.Collections.CurrentCollection.Cache;
|
var cache = manager.Collections.CurrentCollection.Cache;
|
||||||
if( cache == null || !ImGui.BeginTable( "##MissingFilesDebugList", 1, ImGuiTableFlags.RowBg, -Vector2.UnitX))
|
if( cache == null || !ImGui.BeginTable( "##MissingFilesDebugList", 1, ImGuiTableFlags.RowBg, -Vector2.UnitX ) )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -366,6 +366,7 @@ namespace Penumbra.UI
|
||||||
{
|
{
|
||||||
ImGui.SetClipboardText( file.FullName );
|
ImGui.SetClipboardText( file.FullName );
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGuiCustom.HoverTooltip( "Click to copy to clipboard." );
|
ImGuiCustom.HoverTooltip( "Click to copy to clipboard." );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ namespace Penumbra.Util
|
||||||
public static void PrintDebugAddress( string name, IntPtr address )
|
public static void PrintDebugAddress( string name, IntPtr address )
|
||||||
{
|
{
|
||||||
var module = Dalamud.SigScanner.Module.BaseAddress.ToInt64();
|
var module = Dalamud.SigScanner.Module.BaseAddress.ToInt64();
|
||||||
PluginLog.Debug( "{Name} found at 0x{Address:X16}, +0x{Offset}", name, address.ToInt64(), address.ToInt64() - module );
|
PluginLog.Debug( "{Name} found at 0x{Address:X16}, +0x{Offset:X}", name, address.ToInt64(), address.ToInt64() - module );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue