diff --git a/Dalamud/Dalamud.csproj b/Dalamud/Dalamud.csproj index a50f12d79..a4b203406 100644 --- a/Dalamud/Dalamud.csproj +++ b/Dalamud/Dalamud.csproj @@ -6,7 +6,7 @@ XIV Launcher addon framework - 13.0.0.13 + 13.0.0.14 $(DalamudVersion) $(DalamudVersion) $(DalamudVersion) diff --git a/Dalamud/Data/DataManager.cs b/Dalamud/Data/DataManager.cs index ed0aa6c4d..559bd84dc 100644 --- a/Dalamud/Data/DataManager.cs +++ b/Dalamud/Data/DataManager.cs @@ -82,8 +82,10 @@ internal sealed class DataManager : IInternalDisposableService, IDataManager var tsInfo = JsonConvert.DeserializeObject( dalamud.StartInfo.TroubleshootingPackData); + + // Don't fail for IndexIntegrityResult.Exception, since the check during launch has a very small timeout this.HasModifiedGameDataFiles = - tsInfo?.IndexIntegrity is LauncherTroubleshootingInfo.IndexIntegrityResult.Failed or LauncherTroubleshootingInfo.IndexIntegrityResult.Exception; + tsInfo?.IndexIntegrity is LauncherTroubleshootingInfo.IndexIntegrityResult.Failed; if (this.HasModifiedGameDataFiles) Log.Verbose("Game data integrity check failed!\n{TsData}", dalamud.StartInfo.TroubleshootingPackData); diff --git a/Dalamud/Interface/ImGuiSeStringRenderer/SeStringDrawParams.cs b/Dalamud/Interface/ImGuiSeStringRenderer/SeStringDrawParams.cs index 972013328..09c3e9ed9 100644 --- a/Dalamud/Interface/ImGuiSeStringRenderer/SeStringDrawParams.cs +++ b/Dalamud/Interface/ImGuiSeStringRenderer/SeStringDrawParams.cs @@ -25,7 +25,9 @@ public record struct SeStringDrawParams public SeStringReplacementEntity.GetEntityDelegate? GetEntity { get; set; } /// Gets or sets the screen offset of the left top corner. - /// Screen offset to draw at, or null to use . + /// Screen offset to draw at, or null to use , if no + /// is specified. Otherwise, you must specify it (for example, by passing when passing the window + /// draw list. public Vector2? ScreenOffset { get; set; } /// Gets or sets the font to use. diff --git a/Dalamud/Interface/ImGuiSeStringRenderer/SeStringDrawState.cs b/Dalamud/Interface/ImGuiSeStringRenderer/SeStringDrawState.cs index 5e63ef160..5601100e9 100644 --- a/Dalamud/Interface/ImGuiSeStringRenderer/SeStringDrawState.cs +++ b/Dalamud/Interface/ImGuiSeStringRenderer/SeStringDrawState.cs @@ -63,11 +63,12 @@ public unsafe ref struct SeStringDrawState else { this.drawList = ssdp.TargetDrawList.Value; - this.ScreenOffset = Vector2.Zero; + this.ScreenOffset = ssdp.ScreenOffset ?? Vector2.Zero; // API14: Remove, always throw if (ThreadSafety.IsMainThread) { + this.ScreenOffset = ssdp.ScreenOffset ?? ImGui.GetCursorScreenPos(); this.FontSize = ssdp.FontSize ?? ImGui.GetFontSize(); } else diff --git a/Dalamud/Interface/Internal/Windows/Data/Widgets/SeStringRendererTestWidget.cs b/Dalamud/Interface/Internal/Windows/Data/Widgets/SeStringRendererTestWidget.cs index 0f51e0322..6a07152e5 100644 --- a/Dalamud/Interface/Internal/Windows/Data/Widgets/SeStringRendererTestWidget.cs +++ b/Dalamud/Interface/Internal/Windows/Data/Widgets/SeStringRendererTestWidget.cs @@ -177,6 +177,24 @@ internal unsafe class SeStringRendererTestWidget : IDataWindowWidget ImGuiHelpers.SeStringWrapped(this.logkind.Value.Data.Span, this.style); } + if (ImGui.CollapsingHeader("Draw into drawlist")) + { + ImGuiHelpers.ScaledDummy(100); + ImGui.SetCursorScreenPos(ImGui.GetItemRectMin() + ImGui.GetStyle().FramePadding); + var clipMin = ImGui.GetItemRectMin() + ImGui.GetStyle().FramePadding; + var clipMax = ImGui.GetItemRectMax() - ImGui.GetStyle().FramePadding; + clipMin.Y = MathF.Max(clipMin.Y, ImGui.GetWindowPos().Y); + clipMax.Y = MathF.Min(clipMax.Y, ImGui.GetWindowPos().Y + ImGui.GetWindowHeight()); + + var dl = ImGui.GetWindowDrawList(); + dl.PushClipRect(clipMin, clipMax); + ImGuiHelpers.CompileSeStringWrapped( + "Test test", + new SeStringDrawParams + { Color = 0xFFFFFFFF, WrapWidth = float.MaxValue, TargetDrawList = dl }); + dl.PopClipRect(); + } + if (ImGui.CollapsingHeader("Addon Table"u8)) { if (ImGui.BeginTable("Addon Sheet"u8, 3))