Merge branch 'master' of https://github.com/goatcorp/Dalamud into logmessage

This commit is contained in:
RedworkDE 2026-01-03 22:28:43 +01:00
commit 8b0f0fb44e
6 changed files with 23 additions and 16 deletions

View file

@ -6,7 +6,7 @@
<PropertyGroup Label="Feature">
<Description>XIV Launcher addon framework</Description>
<DalamudVersion>14.0.0.2</DalamudVersion>
<DalamudVersion>14.0.0.3</DalamudVersion>
<AssemblyVersion>$(DalamudVersion)</AssemblyVersion>
<Version>$(DalamudVersion)</Version>
<FileVersion>$(DalamudVersion)</FileVersion>

View file

@ -114,7 +114,7 @@ internal class FontAwesomeTestWidget : IDataWindowWidget
Task.FromResult(
Service<TextureManager>.Get().CreateTextureFromSeString(
ReadOnlySeString.FromText(this.icons[i].ToIconString()),
new() { Font = ImGui.GetFont(), FontSize = ImGui.GetFontSize() })));
new() { Font = ImGui.GetFont(), FontSize = ImGui.GetFontSize(), ScreenOffset = Vector2.Zero })));
}
ImGui.PopFont();

View file

@ -126,17 +126,17 @@ internal class UiColorWidget : IDataWindowWidget
ImGui.TableNextColumn();
ImGui.AlignTextToFramePadding();
ImGui.PushID($"row{id}_white");
if (this.DrawColorColumn(row.Unknown0) &&
if (this.DrawColorColumn(row.ClearWhite) &&
adjacentRow.HasValue)
DrawEdgePreview(id, row.Unknown0, adjacentRow.Value.Unknown0);
DrawEdgePreview(id, row.ClearWhite, adjacentRow.Value.ClearWhite);
ImGui.PopID();
ImGui.TableNextColumn();
ImGui.AlignTextToFramePadding();
ImGui.PushID($"row{id}_green");
if (this.DrawColorColumn(row.Unknown1) &&
if (this.DrawColorColumn(row.ClearGreen) &&
adjacentRow.HasValue)
DrawEdgePreview(id, row.Unknown1, adjacentRow.Value.Unknown1);
DrawEdgePreview(id, row.ClearGreen, adjacentRow.Value.ClearGreen);
ImGui.PopID();
}
}

View file

@ -25,9 +25,10 @@ namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
/// </summary>
internal class UldWidget : IDataWindowWidget
{
private const string UldBaseBath = "ui/uld/";
// 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/";
// 48 8D 15 ?? ?? ?? ?? is the part of the signatures that contain the string location offset
// 48 = 64 bit register prefix
@ -46,6 +47,7 @@ internal class UldWidget : IDataWindowWidget
("48 8D 15 ?? ?? ?? ?? 45 33 C0 E9 ?? ?? ?? ??", 3)
];
private DataManager dataManager;
private CancellationTokenSource? cts;
private Task<string[]>? uldNamesTask;
@ -68,6 +70,8 @@ internal class UldWidget : IDataWindowWidget
/// <inheritdoc/>
public void Load()
{
this.dataManager ??= Service<DataManager>.Get();
this.cts?.Cancel();
ClearTask(ref this.uldNamesTask);
this.uldNamesTask = null;
@ -263,7 +267,7 @@ internal class UldWidget : IDataWindowWidget
}
private string ToThemedPath(string path) =>
UldBaseBath + (this.selectedTheme > 0 ? $"img{this.selectedTheme:D2}" : "") + path[UldBaseBath.Length..];
UldBaseBath + (this.selectedTheme > 0 ? $"img{this.selectedTheme:D2}/" : string.Empty) + path[UldBaseBath.Length..];
private void DrawTextureEntry(UldRoot.TextureEntry textureEntry, TextureManager textureManager)
{
@ -291,14 +295,17 @@ internal class UldWidget : IDataWindowWidget
else if (e is not null)
ImGui.Text(e.ToString());
if (this.selectedTheme != 0)
if (this.selectedTheme != 0 && (textureEntry.ThemeSupportBitmask & (1 << (this.selectedTheme - 1))) != 0)
{
var texturePathThemed = this.ToThemedPath(texturePath);
ImGui.Text($"Themed path at {texturePathThemed}:");
if (textureManager.Shared.GetFromGame(texturePathThemed).TryGetWrap(out wrap, out e))
ImGui.Image(wrap.Handle, wrap.Size);
else if (e is not null)
ImGui.Text(e.ToString());
if (this.dataManager.FileExists(texturePathThemed))
{
ImGui.Text($"Themed path at {texturePathThemed}:");
if (textureManager.Shared.GetFromGame(texturePathThemed).TryGetWrap(out wrap, out e))
ImGui.Image(wrap.Handle, wrap.Size);
else if (e is not null)
ImGui.Text(e.ToString());
}
}
ImGui.EndTooltip();