mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-18 05:47:43 +01:00
Merge branch 'master' of https://github.com/goatcorp/Dalamud into logmessage
This commit is contained in:
commit
8b0f0fb44e
6 changed files with 23 additions and 16 deletions
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
<PropertyGroup Label="Feature">
|
<PropertyGroup Label="Feature">
|
||||||
<Description>XIV Launcher addon framework</Description>
|
<Description>XIV Launcher addon framework</Description>
|
||||||
<DalamudVersion>14.0.0.2</DalamudVersion>
|
<DalamudVersion>14.0.0.3</DalamudVersion>
|
||||||
<AssemblyVersion>$(DalamudVersion)</AssemblyVersion>
|
<AssemblyVersion>$(DalamudVersion)</AssemblyVersion>
|
||||||
<Version>$(DalamudVersion)</Version>
|
<Version>$(DalamudVersion)</Version>
|
||||||
<FileVersion>$(DalamudVersion)</FileVersion>
|
<FileVersion>$(DalamudVersion)</FileVersion>
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,7 @@ internal class FontAwesomeTestWidget : IDataWindowWidget
|
||||||
Task.FromResult(
|
Task.FromResult(
|
||||||
Service<TextureManager>.Get().CreateTextureFromSeString(
|
Service<TextureManager>.Get().CreateTextureFromSeString(
|
||||||
ReadOnlySeString.FromText(this.icons[i].ToIconString()),
|
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();
|
ImGui.PopFont();
|
||||||
|
|
|
||||||
|
|
@ -126,17 +126,17 @@ internal class UiColorWidget : IDataWindowWidget
|
||||||
ImGui.TableNextColumn();
|
ImGui.TableNextColumn();
|
||||||
ImGui.AlignTextToFramePadding();
|
ImGui.AlignTextToFramePadding();
|
||||||
ImGui.PushID($"row{id}_white");
|
ImGui.PushID($"row{id}_white");
|
||||||
if (this.DrawColorColumn(row.Unknown0) &&
|
if (this.DrawColorColumn(row.ClearWhite) &&
|
||||||
adjacentRow.HasValue)
|
adjacentRow.HasValue)
|
||||||
DrawEdgePreview(id, row.Unknown0, adjacentRow.Value.Unknown0);
|
DrawEdgePreview(id, row.ClearWhite, adjacentRow.Value.ClearWhite);
|
||||||
ImGui.PopID();
|
ImGui.PopID();
|
||||||
|
|
||||||
ImGui.TableNextColumn();
|
ImGui.TableNextColumn();
|
||||||
ImGui.AlignTextToFramePadding();
|
ImGui.AlignTextToFramePadding();
|
||||||
ImGui.PushID($"row{id}_green");
|
ImGui.PushID($"row{id}_green");
|
||||||
if (this.DrawColorColumn(row.Unknown1) &&
|
if (this.DrawColorColumn(row.ClearGreen) &&
|
||||||
adjacentRow.HasValue)
|
adjacentRow.HasValue)
|
||||||
DrawEdgePreview(id, row.Unknown1, adjacentRow.Value.Unknown1);
|
DrawEdgePreview(id, row.ClearGreen, adjacentRow.Value.ClearGreen);
|
||||||
ImGui.PopID();
|
ImGui.PopID();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,9 +25,10 @@ namespace Dalamud.Interface.Internal.Windows.Data.Widgets;
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal class UldWidget : IDataWindowWidget
|
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.
|
// 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 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 8D 15 ?? ?? ?? ?? is the part of the signatures that contain the string location offset
|
||||||
// 48 = 64 bit register prefix
|
// 48 = 64 bit register prefix
|
||||||
|
|
@ -46,6 +47,7 @@ internal class UldWidget : IDataWindowWidget
|
||||||
("48 8D 15 ?? ?? ?? ?? 45 33 C0 E9 ?? ?? ?? ??", 3)
|
("48 8D 15 ?? ?? ?? ?? 45 33 C0 E9 ?? ?? ?? ??", 3)
|
||||||
];
|
];
|
||||||
|
|
||||||
|
private DataManager dataManager;
|
||||||
private CancellationTokenSource? cts;
|
private CancellationTokenSource? cts;
|
||||||
private Task<string[]>? uldNamesTask;
|
private Task<string[]>? uldNamesTask;
|
||||||
|
|
||||||
|
|
@ -68,6 +70,8 @@ internal class UldWidget : IDataWindowWidget
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public void Load()
|
public void Load()
|
||||||
{
|
{
|
||||||
|
this.dataManager ??= Service<DataManager>.Get();
|
||||||
|
|
||||||
this.cts?.Cancel();
|
this.cts?.Cancel();
|
||||||
ClearTask(ref this.uldNamesTask);
|
ClearTask(ref this.uldNamesTask);
|
||||||
this.uldNamesTask = null;
|
this.uldNamesTask = null;
|
||||||
|
|
@ -263,7 +267,7 @@ internal class UldWidget : IDataWindowWidget
|
||||||
}
|
}
|
||||||
|
|
||||||
private string ToThemedPath(string path) =>
|
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)
|
private void DrawTextureEntry(UldRoot.TextureEntry textureEntry, TextureManager textureManager)
|
||||||
{
|
{
|
||||||
|
|
@ -291,14 +295,17 @@ internal class UldWidget : IDataWindowWidget
|
||||||
else if (e is not null)
|
else if (e is not null)
|
||||||
ImGui.Text(e.ToString());
|
ImGui.Text(e.ToString());
|
||||||
|
|
||||||
if (this.selectedTheme != 0)
|
if (this.selectedTheme != 0 && (textureEntry.ThemeSupportBitmask & (1 << (this.selectedTheme - 1))) != 0)
|
||||||
{
|
{
|
||||||
var texturePathThemed = this.ToThemedPath(texturePath);
|
var texturePathThemed = this.ToThemedPath(texturePath);
|
||||||
ImGui.Text($"Themed path at {texturePathThemed}:");
|
if (this.dataManager.FileExists(texturePathThemed))
|
||||||
if (textureManager.Shared.GetFromGame(texturePathThemed).TryGetWrap(out wrap, out e))
|
{
|
||||||
ImGui.Image(wrap.Handle, wrap.Size);
|
ImGui.Text($"Themed path at {texturePathThemed}:");
|
||||||
else if (e is not null)
|
if (textureManager.Shared.GetFromGame(texturePathThemed).TryGetWrap(out wrap, out e))
|
||||||
ImGui.Text(e.ToString());
|
ImGui.Image(wrap.Handle, wrap.Size);
|
||||||
|
else if (e is not null)
|
||||||
|
ImGui.Text(e.ToString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.EndTooltip();
|
ImGui.EndTooltip();
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 9c5f93cf3ac57236656cd2323b93cd258ea84a88
|
Subproject commit e1e99cf469f87b0f3e8664ee3e3650dff86df2d6
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit d6ff8cf46c7e341989843c28c7550f8d50bee851
|
Subproject commit 52cb5e0a9a7a1138d8c2406c277307a6c9ad8898
|
||||||
Loading…
Add table
Add a link
Reference in a new issue