changed lightless references from you know what
This commit is contained in:
@@ -3,7 +3,7 @@ using Dalamud.Interface.Colors;
|
||||
using Dalamud.Interface.Textures.TextureWraps;
|
||||
using Dalamud.Interface.Utility;
|
||||
using LightlessSync.API.Data.Extensions;
|
||||
using LightlessSync.MareConfiguration;
|
||||
using LightlessSync.LightlessConfiguration;
|
||||
using LightlessSync.PlayerData.Pairs;
|
||||
using LightlessSync.Services;
|
||||
using LightlessSync.Services.Mediator;
|
||||
@@ -15,7 +15,7 @@ namespace LightlessSync.UI;
|
||||
|
||||
public class PopoutProfileUi : WindowMediatorSubscriberBase
|
||||
{
|
||||
private readonly MareProfileManager _mareProfileManager;
|
||||
private readonly LightlessProfileManager _lightlessProfileManager;
|
||||
private readonly PairManager _pairManager;
|
||||
private readonly ServerConfigurationManager _serverManager;
|
||||
private readonly UiSharedService _uiSharedService;
|
||||
@@ -27,13 +27,13 @@ public class PopoutProfileUi : WindowMediatorSubscriberBase
|
||||
private IDalamudTextureWrap? _supporterTextureWrap;
|
||||
private IDalamudTextureWrap? _textureWrap;
|
||||
|
||||
public PopoutProfileUi(ILogger<PopoutProfileUi> logger, MareMediator mediator, UiSharedService uiBuilder,
|
||||
ServerConfigurationManager serverManager, MareConfigService mareConfigService,
|
||||
MareProfileManager mareProfileManager, PairManager pairManager, PerformanceCollectorService performanceCollectorService) : base(logger, mediator, "###LightlessSyncPopoutProfileUI", performanceCollectorService)
|
||||
public PopoutProfileUi(ILogger<PopoutProfileUi> logger, LightlessMediator mediator, UiSharedService uiBuilder,
|
||||
ServerConfigurationManager serverManager, LightlessConfigService lightlessConfigService,
|
||||
LightlessProfileManager lightlessProfileManager, PairManager pairManager, PerformanceCollectorService performanceCollectorService) : base(logger, mediator, "###LightlessSyncPopoutProfileUI", performanceCollectorService)
|
||||
{
|
||||
_uiSharedService = uiBuilder;
|
||||
_serverManager = serverManager;
|
||||
_mareProfileManager = mareProfileManager;
|
||||
_lightlessProfileManager = lightlessProfileManager;
|
||||
_pairManager = pairManager;
|
||||
Flags = ImGuiWindowFlags.NoDecoration;
|
||||
|
||||
@@ -59,7 +59,7 @@ public class PopoutProfileUi : WindowMediatorSubscriberBase
|
||||
_lastMainSize = msg.Size;
|
||||
}
|
||||
var mainPos = msg.Position == Vector2.Zero ? _lastMainPos : msg.Position;
|
||||
if (mareConfigService.Current.ProfilePopoutRight)
|
||||
if (lightlessConfigService.Current.ProfilePopoutRight)
|
||||
{
|
||||
Position = new(mainPos.X + _lastMainSize.X * ImGuiHelpers.GlobalScale, mainPos.Y);
|
||||
}
|
||||
@@ -85,22 +85,22 @@ public class PopoutProfileUi : WindowMediatorSubscriberBase
|
||||
{
|
||||
var spacing = ImGui.GetStyle().ItemSpacing;
|
||||
|
||||
var mareProfile = _mareProfileManager.GetMareProfile(_pair.UserData);
|
||||
var lightlessProfile = _lightlessProfileManager.GetLightlessProfile(_pair.UserData);
|
||||
|
||||
if (_textureWrap == null || !mareProfile.ImageData.Value.SequenceEqual(_lastProfilePicture))
|
||||
if (_textureWrap == null || !lightlessProfile.ImageData.Value.SequenceEqual(_lastProfilePicture))
|
||||
{
|
||||
_textureWrap?.Dispose();
|
||||
_lastProfilePicture = mareProfile.ImageData.Value;
|
||||
_lastProfilePicture = lightlessProfile.ImageData.Value;
|
||||
_textureWrap = _uiSharedService.LoadImage(_lastProfilePicture);
|
||||
}
|
||||
|
||||
if (_supporterTextureWrap == null || !mareProfile.SupporterImageData.Value.SequenceEqual(_lastSupporterPicture))
|
||||
if (_supporterTextureWrap == null || !lightlessProfile.SupporterImageData.Value.SequenceEqual(_lastSupporterPicture))
|
||||
{
|
||||
_supporterTextureWrap?.Dispose();
|
||||
_supporterTextureWrap = null;
|
||||
if (!string.IsNullOrEmpty(mareProfile.Base64SupporterPicture))
|
||||
if (!string.IsNullOrEmpty(lightlessProfile.Base64SupporterPicture))
|
||||
{
|
||||
_lastSupporterPicture = mareProfile.SupporterImageData.Value;
|
||||
_lastSupporterPicture = lightlessProfile.SupporterImageData.Value;
|
||||
_supporterTextureWrap = _uiSharedService.LoadImage(_lastSupporterPicture);
|
||||
}
|
||||
}
|
||||
@@ -158,7 +158,7 @@ public class PopoutProfileUi : WindowMediatorSubscriberBase
|
||||
ImGui.Separator();
|
||||
var font = _uiSharedService.GameFont.Push();
|
||||
var remaining = ImGui.GetWindowContentRegionMax().Y - ImGui.GetCursorPosY();
|
||||
var descText = mareProfile.Description;
|
||||
var descText = lightlessProfile.Description;
|
||||
var textSize = ImGui.CalcTextSize(descText, wrapWidth: 256f * ImGuiHelpers.GlobalScale);
|
||||
bool trimmed = textSize.Y > remaining;
|
||||
while (textSize.Y > remaining && descText.Contains(' '))
|
||||
@@ -166,7 +166,7 @@ public class PopoutProfileUi : WindowMediatorSubscriberBase
|
||||
descText = descText[..descText.LastIndexOf(' ')].TrimEnd();
|
||||
textSize = ImGui.CalcTextSize(descText + $"...{Environment.NewLine}[Open Full Profile for complete description]", wrapWidth: 256f * ImGuiHelpers.GlobalScale);
|
||||
}
|
||||
UiSharedService.TextWrapped(trimmed ? descText + $"...{Environment.NewLine}[Open Full Profile for complete description]" : mareProfile.Description);
|
||||
UiSharedService.TextWrapped(trimmed ? descText + $"...{Environment.NewLine}[Open Full Profile for complete description]" : lightlessProfile.Description);
|
||||
font.Dispose();
|
||||
|
||||
var padding = ImGui.GetStyle().WindowPadding.X / 2;
|
||||
|
||||
Reference in New Issue
Block a user