This commit is contained in:
Soreepeong 2025-07-22 02:10:46 +09:00
parent cc741cec67
commit 51a20300d8
237 changed files with 104170 additions and 24 deletions

View file

@ -1,3 +1,5 @@
using System.Numerics;
using Dalamud.Bindings.ImGui;
using Dalamud.Interface.Internal.UiDebug2.Utility;
using Dalamud.Interface.Utility.Raii;
@ -110,7 +112,7 @@ public unsafe partial class AddonTree
}
catch (Exception ex)
{
ImGui.TextColored(new(1, 0, 0, 1), $"{ex}");
ImGui.TextColored(new Vector4(1, 0, 0, 1), $"{ex}");
}
}
}

View file

@ -121,7 +121,7 @@ public unsafe partial class AddonTree : IDisposable
ImGui.SameLine();
ImGui.SameLine();
ImGui.TextColored(isVisible ? new(0.1f, 1f, 0.1f, 1f) : new(0.6f, 0.6f, 0.6f, 1), isVisible ? "Visible" : "Not Visible");
ImGui.TextColored(isVisible ? new Vector4(0.1f, 1f, 0.1f, 1f) : new(0.6f, 0.6f, 0.6f, 1), isVisible ? "Visible" : "Not Visible");
ImGui.SameLine(ImGui.GetWindowWidth() - 100);

View file

@ -226,13 +226,13 @@ internal unsafe partial class ImageNodeTree : ResNodeTree
ImGui.TableNextColumn();
ImGui.TextColored(!hiRes ? new(1) : new(0.6f, 0.6f, 0.6f, 1), "Standard:\t");
ImGui.TextColored(!hiRes ? new Vector4(1) : new(0.6f, 0.6f, 0.6f, 1), "Standard:\t");
ImGui.SameLine();
var cursX = ImGui.GetCursorPosX();
PrintPartCoords(u / 2f, v / 2f, width / 2f, height / 2f);
ImGui.TextColored(hiRes ? new(1) : new(0.6f, 0.6f, 0.6f, 1), "Hi-Res:\t");
ImGui.TextColored(hiRes ? new Vector4(1) : new(0.6f, 0.6f, 0.6f, 1), "Hi-Res:\t");
ImGui.SameLine();
ImGui.SetCursorPosX(cursX);

View file

@ -1,3 +1,4 @@
using System.Numerics;
using System.Runtime.InteropServices;
using Dalamud.Bindings.ImGui;
@ -46,7 +47,7 @@ internal unsafe partial class TextNodeTree : ResNodeTree
return;
}
ImGui.TextColored(new(1), "Text:");
ImGui.TextColored(new Vector4(1), "Text:");
ImGui.SameLine();
try

View file

@ -74,7 +74,7 @@ public readonly unsafe partial struct TimelineTree
("Frame Time", $"{this.NodeTimeline->FrameTime:F2} ({this.NodeTimeline->FrameTime * 30:F0})"));
PrintFieldValuePairs(("Active Label Id", $"{this.NodeTimeline->ActiveLabelId}"), ("Duration", $"{this.NodeTimeline->LabelFrameIdxDuration}"), ("End Frame", $"{this.NodeTimeline->LabelEndFrameIdx}"));
ImGui.TextColored(new(0.6f, 0.6f, 0.6f, 1), "Animation List");
ImGui.TextColored(new Vector4(0.6f, 0.6f, 0.6f, 1), "Animation List");
for (var a = 0; a < animationCount; a++)
{

View file

@ -293,8 +293,7 @@ internal class GamePrebakedFontsTestWidget : IDataWindowWidget, IDisposable
}
else if (!handle.Value.Available)
{
fixed (byte* labelPtr = "Loading..."u8)
ImGui.TextUnformatted(labelPtr, labelPtr + 8 + ((Environment.TickCount / 200) % 3));
ImGui.TextUnformatted("Loading..."u8[..(8 + ((Environment.TickCount / 200) % 3))]);
}
else
{
@ -303,16 +302,12 @@ internal class GamePrebakedFontsTestWidget : IDataWindowWidget, IDisposable
if (counter++ % 2 == 0)
{
using var pushPop = handle.Value.Push();
ImGui.TextUnformatted(
this.testStringBuffer.Data,
this.testStringBuffer.Data + this.testStringBuffer.Length);
ImGui.TextUnformatted(this.testStringBuffer.DataSpan);
}
else
{
handle.Value.Push();
ImGui.TextUnformatted(
this.testStringBuffer.Data,
this.testStringBuffer.Data + this.testStringBuffer.Length);
ImGui.TextUnformatted(this.testStringBuffer.DataSpan);
handle.Value.Pop();
}
}
@ -379,12 +374,9 @@ internal class GamePrebakedFontsTestWidget : IDataWindowWidget, IDisposable
return;
unsafe void TestSingle(ImFontPtr fontPtr, IFontHandle handle)
void TestSingle(ImFontPtr fontPtr, IFontHandle handle)
{
var dim = default(Vector2);
var test = "Test string"u8;
fixed (byte* pTest = test)
ImGui.CalcTextSizeA(ref dim, fontPtr, fontPtr.FontSize, float.MaxValue, 0f, pTest, (string)null, null);
var dim = ImGui.CalcTextSizeA(fontPtr, fontPtr.FontSize, float.MaxValue, 0f, "Test string"u8, out _);
Log.Information($"{nameof(GamePrebakedFontsTestWidget)}: {handle} => {dim}");
}
}

View file

@ -210,7 +210,8 @@ public class SettingsTabLook : SettingsTab
var len = Encoding.UTF8.GetByteCount(buildingFonts);
var p = stackalloc byte[len];
Encoding.UTF8.GetBytes(buildingFonts, new(p, len));
ImGui.TextUnformatted(p, (p + len + ((Environment.TickCount / 200) % 3)) - 2);
ImGui.TextUnformatted(
new ReadOnlySpan<byte>(p, len)[..((len + ((Environment.TickCount / 200) % 3)) - 2)]);
}
}