mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-15 21:24:18 +01:00
Wow, I accidentally the whole UI
This commit is contained in:
parent
dd8c910597
commit
651c7410ac
87 changed files with 7571 additions and 7280 deletions
|
|
@ -42,7 +42,7 @@ public partial class ResourceWatcher
|
|||
private sealed class PathColumn : ColumnString< Record >
|
||||
{
|
||||
public override float Width
|
||||
=> 300 * ImGuiHelpers.GlobalScale;
|
||||
=> 300 * UiHelpers.Scale;
|
||||
|
||||
public override string ToName( Record item )
|
||||
=> item.Path.ToString();
|
||||
|
|
@ -51,7 +51,7 @@ public partial class ResourceWatcher
|
|||
=> lhs.Path.CompareTo( rhs.Path );
|
||||
|
||||
public override void DrawColumn( Record item, int _ )
|
||||
=> DrawByteString( item.Path, 290 * ImGuiHelpers.GlobalScale );
|
||||
=> DrawByteString( item.Path, 290 * UiHelpers.Scale );
|
||||
}
|
||||
|
||||
private static unsafe void DrawByteString( ByteString path, float length )
|
||||
|
|
@ -68,7 +68,7 @@ public partial class ResourceWatcher
|
|||
ByteString shortPath;
|
||||
if( fileName != -1 )
|
||||
{
|
||||
using var style = ImRaii.PushStyle( ImGuiStyleVar.ItemSpacing, new Vector2( 2 * ImGuiHelpers.GlobalScale ) );
|
||||
using var style = ImRaii.PushStyle( ImGuiStyleVar.ItemSpacing, new Vector2( 2 * UiHelpers.Scale ) );
|
||||
using var font = ImRaii.PushFont( UiBuilder.IconFont );
|
||||
ImGui.TextUnformatted( FontAwesomeIcon.EllipsisH.ToIconString() );
|
||||
ImGui.SameLine();
|
||||
|
|
@ -98,7 +98,7 @@ public partial class ResourceWatcher
|
|||
=> AllFlags = AllRecords;
|
||||
|
||||
public override float Width
|
||||
=> 80 * ImGuiHelpers.GlobalScale;
|
||||
=> 80 * UiHelpers.Scale;
|
||||
|
||||
public override bool FilterFunc( Record item )
|
||||
=> FilterValue.HasFlag( item.RecordType );
|
||||
|
|
@ -136,7 +136,7 @@ public partial class ResourceWatcher
|
|||
private sealed class DateColumn : Column< Record >
|
||||
{
|
||||
public override float Width
|
||||
=> 80 * ImGuiHelpers.GlobalScale;
|
||||
=> 80 * UiHelpers.Scale;
|
||||
|
||||
public override int Compare( Record lhs, Record rhs )
|
||||
=> lhs.Time.CompareTo( rhs.Time );
|
||||
|
|
@ -149,7 +149,7 @@ public partial class ResourceWatcher
|
|||
private sealed class CollectionColumn : ColumnString< Record >
|
||||
{
|
||||
public override float Width
|
||||
=> 80 * ImGuiHelpers.GlobalScale;
|
||||
=> 80 * UiHelpers.Scale;
|
||||
|
||||
public override string ToName( Record item )
|
||||
=> item.Collection?.Name ?? string.Empty;
|
||||
|
|
@ -158,7 +158,7 @@ public partial class ResourceWatcher
|
|||
private sealed class OriginalPathColumn : ColumnString< Record >
|
||||
{
|
||||
public override float Width
|
||||
=> 200 * ImGuiHelpers.GlobalScale;
|
||||
=> 200 * UiHelpers.Scale;
|
||||
|
||||
public override string ToName( Record item )
|
||||
=> item.OriginalPath.ToString();
|
||||
|
|
@ -167,7 +167,7 @@ public partial class ResourceWatcher
|
|||
=> lhs.OriginalPath.CompareTo( rhs.OriginalPath );
|
||||
|
||||
public override void DrawColumn( Record item, int _ )
|
||||
=> DrawByteString( item.OriginalPath, 190 * ImGuiHelpers.GlobalScale );
|
||||
=> DrawByteString( item.OriginalPath, 190 * UiHelpers.Scale );
|
||||
}
|
||||
|
||||
private sealed class ResourceCategoryColumn : ColumnFlags< ResourceCategoryFlag, Record >
|
||||
|
|
@ -176,7 +176,7 @@ public partial class ResourceWatcher
|
|||
=> AllFlags = ResourceExtensions.AllResourceCategories;
|
||||
|
||||
public override float Width
|
||||
=> 80 * ImGuiHelpers.GlobalScale;
|
||||
=> 80 * UiHelpers.Scale;
|
||||
|
||||
public override bool FilterFunc( Record item )
|
||||
=> FilterValue.HasFlag( item.Category );
|
||||
|
|
@ -216,7 +216,7 @@ public partial class ResourceWatcher
|
|||
}
|
||||
|
||||
public override float Width
|
||||
=> 50 * ImGuiHelpers.GlobalScale;
|
||||
=> 50 * UiHelpers.Scale;
|
||||
|
||||
public override bool FilterFunc( Record item )
|
||||
=> FilterValue.HasFlag( item.ResourceType );
|
||||
|
|
@ -247,7 +247,7 @@ public partial class ResourceWatcher
|
|||
private sealed class HandleColumn : ColumnString< Record >
|
||||
{
|
||||
public override float Width
|
||||
=> 120 * ImGuiHelpers.GlobalScale;
|
||||
=> 120 * UiHelpers.Scale;
|
||||
|
||||
public override unsafe string ToName( Record item )
|
||||
=> item.Handle == null ? string.Empty : $"0x{( ulong )item.Handle:X}";
|
||||
|
|
@ -316,7 +316,7 @@ public partial class ResourceWatcher
|
|||
private sealed class CustomLoadColumn : OptBoolColumn
|
||||
{
|
||||
public override float Width
|
||||
=> 60 * ImGuiHelpers.GlobalScale;
|
||||
=> 60 * UiHelpers.Scale;
|
||||
|
||||
public override bool FilterFunc( Record item )
|
||||
=> FilterFunc( item.CustomLoad );
|
||||
|
|
@ -328,7 +328,7 @@ public partial class ResourceWatcher
|
|||
private sealed class SynchronousLoadColumn : OptBoolColumn
|
||||
{
|
||||
public override float Width
|
||||
=> 45 * ImGuiHelpers.GlobalScale;
|
||||
=> 45 * UiHelpers.Scale;
|
||||
|
||||
public override bool FilterFunc( Record item )
|
||||
=> FilterFunc( item.Synchronously );
|
||||
|
|
@ -340,7 +340,7 @@ public partial class ResourceWatcher
|
|||
private sealed class RefCountColumn : Column< Record >
|
||||
{
|
||||
public override float Width
|
||||
=> 30 * ImGuiHelpers.GlobalScale;
|
||||
=> 30 * UiHelpers.Scale;
|
||||
|
||||
public override void DrawColumn( Record item, int _ )
|
||||
=> ImGuiUtil.RightAlign( item.RefCount.ToString() );
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ public partial class ResourceWatcher : IDisposable, ITab
|
|||
var tmp = _logFilter;
|
||||
var invalidRegex = _logRegex == null && _logFilter.Length > 0;
|
||||
using var color = ImRaii.PushColor(ImGuiCol.Border, Colors.RegexWarningBorder, invalidRegex);
|
||||
using var style = ImRaii.PushStyle(ImGuiStyleVar.FrameBorderSize, ImGuiHelpers.GlobalScale, invalidRegex);
|
||||
using var style = ImRaii.PushStyle(ImGuiStyleVar.FrameBorderSize, UiHelpers.Scale, invalidRegex);
|
||||
if (ImGui.InputTextWithHint("##logFilter", "If path matches this Regex...", ref tmp, 256))
|
||||
UpdateFilter(tmp, true);
|
||||
}
|
||||
|
|
@ -151,7 +151,7 @@ public partial class ResourceWatcher : IDisposable, ITab
|
|||
|
||||
private void DrawMaxEntries()
|
||||
{
|
||||
ImGui.SetNextItemWidth(80 * ImGuiHelpers.GlobalScale);
|
||||
ImGui.SetNextItemWidth(80 * UiHelpers.Scale);
|
||||
ImGui.InputInt("Max. Entries", ref _newMaxEntries, 0, 0);
|
||||
var change = ImGui.IsItemDeactivatedAfterEdit();
|
||||
if (ImGui.IsItemClicked(ImGuiMouseButton.Right) && ImGui.GetIO().KeyCtrl)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue