mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-04 06:54:42 +01:00
Add reloading button to textures.
This commit is contained in:
parent
62d3053d34
commit
0d150cf19b
1 changed files with 11 additions and 1 deletions
|
|
@ -250,7 +250,7 @@ public sealed class Texture : IDisposable
|
|||
_tmpPath ??= Path;
|
||||
using var spacing = ImRaii.PushStyle( ImGuiStyleVar.ItemSpacing,
|
||||
new Vector2( 3 * ImGuiHelpers.GlobalScale, ImGui.GetStyle().ItemSpacing.Y ) );
|
||||
ImGui.SetNextItemWidth( -ImGui.GetFrameHeight() - 3 * ImGuiHelpers.GlobalScale );
|
||||
ImGui.SetNextItemWidth( -2 * ImGui.GetFrameHeight() - 7 * ImGuiHelpers.GlobalScale );
|
||||
ImGui.InputTextWithHint( label, hint, ref _tmpPath, Utf8GamePath.MaxGamePathLength );
|
||||
if( ImGui.IsItemDeactivatedAfterEdit() )
|
||||
{
|
||||
|
|
@ -279,5 +279,15 @@ public sealed class Texture : IDisposable
|
|||
|
||||
manager.OpenFileDialog( "Open Image...", "Textures{.png,.dds,.tex}", UpdatePath, 1, startPath );
|
||||
}
|
||||
|
||||
ImGui.SameLine();
|
||||
if( ImGuiUtil.DrawDisabledButton( FontAwesomeIcon.Recycle.ToIconString(), new Vector2( ImGui.GetFrameHeight() ),
|
||||
"Reload the currently selected path.", false,
|
||||
true ) )
|
||||
{
|
||||
var path = Path;
|
||||
Path = string.Empty;
|
||||
Load( path );
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue