Dalamud API10
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
using Dalamud.Interface.Colors;
|
||||
using Dalamud.Interface.Internal;
|
||||
|
||||
using Dalamud.Interface.Textures.TextureWraps;
|
||||
using Dalamud.Interface.Utility;
|
||||
using Dalamud.Interface.Utility.Raii;
|
||||
using ImGuiNET;
|
||||
@@ -29,11 +28,11 @@ public class PopoutProfileUi : WindowMediatorSubscriberBase
|
||||
private IDalamudTextureWrap? _supporterTextureWrap;
|
||||
private IDalamudTextureWrap? _textureWrap;
|
||||
|
||||
public PopoutProfileUi(ILogger<PopoutProfileUi> logger, MareMediator mediator, UiSharedService uiBuilder,
|
||||
public PopoutProfileUi(ILogger<PopoutProfileUi> logger, MareMediator mediator, UiSharedService uiSharedService,
|
||||
ServerConfigurationManager serverManager, MareConfigService mareConfigService,
|
||||
MareProfileManager mareProfileManager, PairManager pairManager) : base(logger, mediator, "###LoporritSyncPopoutProfileUI")
|
||||
{
|
||||
_uiSharedService = uiBuilder;
|
||||
_uiSharedService = uiSharedService;
|
||||
_serverManager = serverManager;
|
||||
_mareProfileManager = mareProfileManager;
|
||||
_pairManager = pairManager;
|
||||
@@ -111,7 +110,7 @@ public class PopoutProfileUi : WindowMediatorSubscriberBase
|
||||
var rectMin = drawList.GetClipRectMin();
|
||||
var rectMax = drawList.GetClipRectMax();
|
||||
|
||||
using (ImRaii.PushFont(_uiSharedService.UidFont, _uiSharedService.UidFontBuilt))
|
||||
using (_uiSharedService.UidFont.Push())
|
||||
UiSharedService.ColorText(_pair.UserData.AliasOrUID, UiSharedService.AccentColor);
|
||||
|
||||
ImGuiHelpers.ScaledDummy(spacing.Y, spacing.Y);
|
||||
@@ -158,7 +157,7 @@ public class PopoutProfileUi : WindowMediatorSubscriberBase
|
||||
}
|
||||
|
||||
ImGui.Separator();
|
||||
ImGui.PushFont(_uiSharedService.GetGameFontHandle());
|
||||
_uiSharedService.GameFont.Push();
|
||||
var remaining = ImGui.GetWindowContentRegionMax().Y - ImGui.GetCursorPosY();
|
||||
var descText = mareProfile.Description;
|
||||
var textSize = ImGui.CalcTextSize(descText, 256f * ImGuiHelpers.GlobalScale);
|
||||
@@ -169,7 +168,8 @@ public class PopoutProfileUi : WindowMediatorSubscriberBase
|
||||
textSize = ImGui.CalcTextSize(descText + $"...{Environment.NewLine}[Open Full Profile for complete description]", 256f * ImGuiHelpers.GlobalScale);
|
||||
}
|
||||
UiSharedService.TextWrapped(trimmed ? descText + $"...{Environment.NewLine}[Open Full Profile for complete description]" : mareProfile.Description);
|
||||
ImGui.PopFont();
|
||||
|
||||
_uiSharedService.GameFont.Pop();
|
||||
|
||||
var padding = ImGui.GetStyle().WindowPadding.X / 2;
|
||||
bool tallerThanWide = _textureWrap.Height >= _textureWrap.Width;
|
||||
|
||||
Reference in New Issue
Block a user