mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-07 08:24:37 +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">
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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