Make it build against Dalamud 13 (#84)

This commit is contained in:
N. Lo. 2025-08-08 22:42:18 +02:00 committed by GitHub
parent f94af2cc9e
commit 108bbe2a02
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 78 additions and 82 deletions

View file

@ -1,7 +1,7 @@
using Dalamud.Interface.Colors;
using Dalamud.Bindings.ImGui;
using Dalamud.Interface.Colors;
using Dalamud.Interface.Textures.TextureWraps;
using Dalamud.Interface.Utility;
using ImGuiNET;
using MareSynchronos.API.Data.Extensions;
using MareSynchronos.PlayerData.Pairs;
using MareSynchronos.Services;
@ -86,7 +86,7 @@ public class StandaloneProfileUi : WindowMediatorSubscriberBase
ImGuiHelpers.ScaledDummy(new Vector2(256, 256 + spacing.Y));
var postDummy = ImGui.GetCursorPosY();
ImGui.SameLine();
var descriptionTextSize = ImGui.CalcTextSize(mareProfile.Description, 256f);
var descriptionTextSize = ImGui.CalcTextSize(mareProfile.Description, wrapWidth: 256f);
var descriptionChildHeight = rectMax.Y - pos.Y - rectMin.Y - spacing.Y * 2;
if (descriptionTextSize.Y > descriptionChildHeight && !_adjustedForScrollBars)
{
@ -158,12 +158,12 @@ public class StandaloneProfileUi : WindowMediatorSubscriberBase
var newHeight = _textureWrap.Height * stretchFactor;
var remainingWidth = (256f * ImGuiHelpers.GlobalScale - newWidth) / 2f;
var remainingHeight = (256f * ImGuiHelpers.GlobalScale - newHeight) / 2f;
drawList.AddImage(_textureWrap.ImGuiHandle, new Vector2(rectMin.X + padding + remainingWidth, rectMin.Y + spacing.Y + pos.Y + remainingHeight),
drawList.AddImage(_textureWrap.Handle, new Vector2(rectMin.X + padding + remainingWidth, rectMin.Y + spacing.Y + pos.Y + remainingHeight),
new Vector2(rectMin.X + padding + remainingWidth + newWidth, rectMin.Y + spacing.Y + pos.Y + remainingHeight + newHeight));
if (_supporterTextureWrap != null)
{
const float iconSize = 38;
drawList.AddImage(_supporterTextureWrap.ImGuiHandle,
drawList.AddImage(_supporterTextureWrap.Handle,
new Vector2(rectMax.X - iconSize - spacing.X, rectMin.Y + (textPos / 2) - (iconSize / 2)),
new Vector2(rectMax.X - spacing.X, rectMin.Y + iconSize + (textPos / 2) - (iconSize / 2)));
}