Compare commits

..

No commits in common. "5e4ad4a6947a7dbb7c12672b42e08ff194fffd0c" and "7eea7d6182c6becc92175b158d6782038d9045af" have entirely different histories.

5 changed files with 40 additions and 143 deletions

View file

@ -44,7 +44,7 @@ internal class UiColorWidget : IDataWindowWidget
"<edgecolor(0xEEEEFF)><color(0x0000FF)>BB<color(stackcolor)><edgecolor(stackcolor)>.<br>" +
"· Click on a color to copy the color code.<br>" +
"· Hover on a color to preview the text with edge, when the next color has been used together.");
if (!ImGui.BeginTable("UIColor"u8, 7))
if (!ImGui.BeginTable("UIColor"u8, 5))
return;
ImGui.TableSetupScrollFreeze(0, 1);
@ -62,8 +62,6 @@ internal class UiColorWidget : IDataWindowWidget
ImGui.TableSetupColumn("Light"u8, ImGuiTableColumnFlags.WidthFixed, colorw);
ImGui.TableSetupColumn("Classic FF"u8, ImGuiTableColumnFlags.WidthFixed, colorw);
ImGui.TableSetupColumn("Clear Blue"u8, ImGuiTableColumnFlags.WidthFixed, colorw);
ImGui.TableSetupColumn("Clear White"u8, ImGuiTableColumnFlags.WidthFixed, colorw);
ImGui.TableSetupColumn("Clear Green"u8, ImGuiTableColumnFlags.WidthFixed, colorw);
ImGui.TableHeadersRow();
var clipper = ImGui.ImGuiListClipper();
@ -122,22 +120,6 @@ internal class UiColorWidget : IDataWindowWidget
adjacentRow.HasValue)
DrawEdgePreview(id, row.ClearBlue, adjacentRow.Value.ClearBlue);
ImGui.PopID();
ImGui.TableNextColumn();
ImGui.AlignTextToFramePadding();
ImGui.PushID($"row{id}_white");
if (this.DrawColorColumn(row.Unknown0) &&
adjacentRow.HasValue)
DrawEdgePreview(id, row.Unknown0, adjacentRow.Value.Unknown0);
ImGui.PopID();
ImGui.TableNextColumn();
ImGui.AlignTextToFramePadding();
ImGui.PushID($"row{id}_green");
if (this.DrawColorColumn(row.Unknown1) &&
adjacentRow.HasValue)
DrawEdgePreview(id, row.Unknown1, adjacentRow.Value.Unknown1);
ImGui.PopID();
}
}

View file

@ -26,8 +26,8 @@ namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
internal class UldWidget : IDataWindowWidget
{
// ULD styles can be hardcoded for now as they don't add new ones regularly. Can later try and find where to load these from in the game EXE.
private static readonly string[] ThemeDisplayNames = ["Dark", "Light", "Classic FF", "Clear Blue", "Clear White", "Clear Green"];
private const string UldBaseBath = "ui/uld/";
private static readonly string[] ThemeDisplayNames = ["Dark", "Light", "Classic FF", "Clear Blue"];
private static readonly string[] ThemeBasePaths = ["ui/uld/", "ui/uld/img01/", "ui/uld/img02/", "ui/uld/img03/"];
// 48 8D 15 ?? ?? ?? ?? is the part of the signatures that contain the string location offset
// 48 = 64 bit register prefix
@ -263,7 +263,7 @@ internal class UldWidget : IDataWindowWidget
}
private string ToThemedPath(string path) =>
UldBaseBath + (this.selectedTheme > 0 ? $"img{this.selectedTheme:D2}" : "") + path[UldBaseBath.Length..];
ThemeBasePaths[this.selectedTheme] + path[ThemeBasePaths[0].Length..];
private void DrawTextureEntry(UldRoot.TextureEntry textureEntry, TextureManager textureManager)
{

View file

@ -127,13 +127,8 @@ public unsafe partial class ImGui
var t = new ImU8String(buf);
t.Reserve(maxLength + 1);
var r = InputText(label, t.Buffer[..(maxLength + 1)], flags, callback);
if (r)
{
var i = t.Buffer.IndexOf((byte)0);
buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]);
}
var i = t.Buffer.IndexOf((byte)0);
buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]);
t.Recycle();
return r;
}
@ -145,13 +140,8 @@ public unsafe partial class ImGui
var t = new ImU8String(buf);
t.Reserve(maxLength + 1);
var r = InputText(label, t.Buffer[..(maxLength + 1)], flags, callback);
if (r)
{
var i = t.Buffer.IndexOf((byte)0);
buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]);
}
var i = t.Buffer.IndexOf((byte)0);
buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]);
t.Recycle();
return r;
}
@ -163,13 +153,8 @@ public unsafe partial class ImGui
var t = new ImU8String(buf);
t.Reserve(maxLength + 1);
var r = InputText(label, t.Buffer[..(maxLength + 1)], flags, callback, ref context);
if (r)
{
var i = t.Buffer.IndexOf((byte)0);
buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]);
}
var i = t.Buffer.IndexOf((byte)0);
buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]);
t.Recycle();
return r;
}
@ -181,13 +166,8 @@ public unsafe partial class ImGui
var t = new ImU8String(buf);
t.Reserve(maxLength + 1);
var r = InputText(label, t.Buffer[..(maxLength + 1)], flags, callback, in context);
if (r)
{
var i = t.Buffer.IndexOf((byte)0);
buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]);
}
var i = t.Buffer.IndexOf((byte)0);
buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]);
t.Recycle();
return r;
}
@ -307,13 +287,8 @@ public unsafe partial class ImGui
var t = new ImU8String(buf);
t.Reserve(maxLength + 1);
var r = InputTextEx(label, hint, t.Buffer[..(maxLength + 1)], sizeArg, flags, callback);
if (r)
{
var i = t.Buffer.IndexOf((byte)0);
buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]);
}
var i = t.Buffer.IndexOf((byte)0);
buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]);
t.Recycle();
return r;
}
@ -325,13 +300,8 @@ public unsafe partial class ImGui
var t = new ImU8String(buf);
t.Reserve(maxLength + 1);
var r = InputTextEx(label, hint, t.Buffer[..(maxLength + 1)], sizeArg, flags, callback);
if (r)
{
var i = t.Buffer.IndexOf((byte)0);
buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]);
}
var i = t.Buffer.IndexOf((byte)0);
buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]);
t.Recycle();
return r;
}
@ -344,13 +314,8 @@ public unsafe partial class ImGui
var t = new ImU8String(buf);
t.Reserve(maxLength + 1);
var r = InputTextEx(label, hint, t.Buffer[..(maxLength + 1)], sizeArg, flags, callback, ref context);
if (r)
{
var i = t.Buffer.IndexOf((byte)0);
buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]);
}
var i = t.Buffer.IndexOf((byte)0);
buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]);
t.Recycle();
return r;
}
@ -363,13 +328,8 @@ public unsafe partial class ImGui
var t = new ImU8String(buf);
t.Reserve(maxLength + 1);
var r = InputTextEx(label, hint, t.Buffer[..(maxLength + 1)], sizeArg, flags, callback, in context);
if (r)
{
var i = t.Buffer.IndexOf((byte)0);
buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]);
}
var i = t.Buffer.IndexOf((byte)0);
buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]);
t.Recycle();
return r;
}
@ -428,13 +388,8 @@ public unsafe partial class ImGui
var t = new ImU8String(buf);
t.Reserve(maxLength + 1);
var r = InputTextMultiline(label, t.Buffer[..(maxLength + 1)], size, flags, callback);
if (r)
{
var i = t.Buffer.IndexOf((byte)0);
buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]);
}
var i = t.Buffer.IndexOf((byte)0);
buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]);
t.Recycle();
return r;
}
@ -446,13 +401,8 @@ public unsafe partial class ImGui
var t = new ImU8String(buf);
t.Reserve(maxLength + 1);
var r = InputTextMultiline(label, t.Buffer[..(maxLength + 1)], size, flags, callback);
if (r)
{
var i = t.Buffer.IndexOf((byte)0);
buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]);
}
var i = t.Buffer.IndexOf((byte)0);
buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]);
t.Recycle();
return r;
}
@ -464,13 +414,8 @@ public unsafe partial class ImGui
var t = new ImU8String(buf);
t.Reserve(maxLength + 1);
var r = InputTextMultiline(label, t.Buffer[..(maxLength + 1)], size, flags, callback, ref context);
if (r)
{
var i = t.Buffer.IndexOf((byte)0);
buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]);
}
var i = t.Buffer.IndexOf((byte)0);
buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]);
t.Recycle();
return r;
}
@ -482,13 +427,8 @@ public unsafe partial class ImGui
var t = new ImU8String(buf);
t.Reserve(maxLength + 1);
var r = InputTextMultiline(label, t.Buffer[..(maxLength + 1)], size, flags, callback, in context);
if (r)
{
var i = t.Buffer.IndexOf((byte)0);
buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]);
}
var i = t.Buffer.IndexOf((byte)0);
buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]);
t.Recycle();
return r;
}
@ -537,13 +477,8 @@ public unsafe partial class ImGui
var t = new ImU8String(buf);
t.Reserve(maxLength + 1);
var r = InputTextWithHint(label, hint, t.Buffer[..(maxLength + 1)], flags, callback);
if (r)
{
var i = t.Buffer.IndexOf((byte)0);
buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]);
}
var i = t.Buffer.IndexOf((byte)0);
buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]);
t.Recycle();
return r;
}
@ -555,13 +490,8 @@ public unsafe partial class ImGui
var t = new ImU8String(buf);
t.Reserve(maxLength + 1);
var r = InputTextWithHint(label, hint, t.Buffer[..(maxLength + 1)], flags, callback);
if (r)
{
var i = t.Buffer.IndexOf((byte)0);
buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]);
}
var i = t.Buffer.IndexOf((byte)0);
buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]);
t.Recycle();
return r;
}
@ -573,13 +503,8 @@ public unsafe partial class ImGui
var t = new ImU8String(buf);
t.Reserve(maxLength + 1);
var r = InputTextWithHint(label, hint, t.Buffer[..(maxLength + 1)], flags, callback, ref context);
if (r)
{
var i = t.Buffer.IndexOf((byte)0);
buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]);
}
var i = t.Buffer.IndexOf((byte)0);
buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]);
t.Recycle();
return r;
}
@ -591,13 +516,8 @@ public unsafe partial class ImGui
var t = new ImU8String(buf);
t.Reserve(maxLength + 1);
var r = InputTextWithHint(label, hint, t.Buffer[..(maxLength + 1)], flags, callback, in context);
if (r)
{
var i = t.Buffer.IndexOf((byte)0);
buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]);
}
var i = t.Buffer.IndexOf((byte)0);
buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]);
t.Recycle();
return r;
}
@ -621,13 +541,8 @@ public unsafe partial class ImGui
var t = new ImU8String(buf);
t.Reserve(maxLength + 1);
var r = TempInputText(bb, id, label, t.Buffer[..(maxLength + 1)], flags);
if (r)
{
var i = t.Buffer.IndexOf((byte)0);
buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]);
}
var i = t.Buffer.IndexOf((byte)0);
buf = Encoding.UTF8.GetString(i == -1 ? t.Buffer : t.Buffer[..i]);
t.Recycle();
return r;
}

@ -1 +1 @@
Subproject commit faf803a76813511768d45c137a543aaacf5420b8
Subproject commit f60c282d63b4157a8f8fb7cbb7e0b35361cdaa12

@ -1 +1 @@
Subproject commit 7d3f90e61732df6aef63196d1abaab1074f6f3c9
Subproject commit d8d0b53e27393f509ac5397511cb8d251d562277