UI Update
This commit is contained in:
@@ -68,6 +68,7 @@ public class CompactUi : WindowMediatorSubscriberBase
|
|||||||
private bool _showModalForUserAddition;
|
private bool _showModalForUserAddition;
|
||||||
private bool _wasOpen;
|
private bool _wasOpen;
|
||||||
private bool _nearbyOpen = true;
|
private bool _nearbyOpen = true;
|
||||||
|
private bool _visibleOpen = true;
|
||||||
private bool _selfAnalysisOpen = false;
|
private bool _selfAnalysisOpen = false;
|
||||||
private List<Services.Mediator.NearbyEntry> _nearbyEntries = new();
|
private List<Services.Mediator.NearbyEntry> _nearbyEntries = new();
|
||||||
private const long SelfAnalysisSizeWarningThreshold = 300L * 1024 * 1024;
|
private const long SelfAnalysisSizeWarningThreshold = 300L * 1024 * 1024;
|
||||||
@@ -682,6 +683,9 @@ if (showNearby && pendingInvites > 0)
|
|||||||
var allUsers = GetFilteredUsers().OrderBy(u => u.GetPairSortKey(), StringComparer.Ordinal).ToList();
|
var allUsers = GetFilteredUsers().OrderBy(u => u.GetPairSortKey(), StringComparer.Ordinal).ToList();
|
||||||
var visibleUsersSource = allUsers.Where(u => u.IsVisible).ToList();
|
var visibleUsersSource = allUsers.Where(u => u.IsVisible).ToList();
|
||||||
var nonVisibleUsers = allUsers.Where(u => !u.IsVisible).ToList();
|
var nonVisibleUsers = allUsers.Where(u => !u.IsVisible).ToList();
|
||||||
|
var nearbyEntriesForDisplay = _configService.Current.EnableAutoDetectDiscovery
|
||||||
|
? GetNearbyEntriesForDisplay()
|
||||||
|
: new List<Services.Mediator.NearbyEntry>();
|
||||||
|
|
||||||
ImGui.BeginChild("list", new Vector2(WindowContentWidth, ySize), border: false);
|
ImGui.BeginChild("list", new Vector2(WindowContentWidth, ySize), border: false);
|
||||||
|
|
||||||
@@ -698,21 +702,35 @@ if (showNearby && pendingInvites > 0)
|
|||||||
if (mode == PairContentMode.VisibleOnly)
|
if (mode == PairContentMode.VisibleOnly)
|
||||||
{
|
{
|
||||||
var visibleUsers = visibleUsersSource.Select(c => new DrawUserPair("Visible" + c.UserData.UID, c, _uidDisplayHandler, _apiController, Mediator, _selectGroupForPairUi, _uiSharedService, _charaDataManager, _serverManager)).ToList();
|
var visibleUsers = visibleUsersSource.Select(c => new DrawUserPair("Visible" + c.UserData.UID, c, _uidDisplayHandler, _apiController, Mediator, _selectGroupForPairUi, _uiSharedService, _charaDataManager, _serverManager)).ToList();
|
||||||
if (visibleUsers.Count == 0)
|
bool showVisibleCard = visibleUsers.Count > 0;
|
||||||
|
bool showNearbyCard = nearbyEntriesForDisplay.Count > 0;
|
||||||
|
|
||||||
|
if (!showVisibleCard && !showNearbyCard)
|
||||||
{
|
{
|
||||||
UiSharedService.ColorTextWrapped("Aucune paire visible pour l'instant.", ImGuiColors.DalamudGrey3);
|
const string calmMessage = "C'est bien trop calme ici... Il n'y a rien pour le moment.";
|
||||||
|
using (_uiSharedService.UidFont.Push())
|
||||||
|
{
|
||||||
|
var regionMin = ImGui.GetWindowContentRegionMin();
|
||||||
|
var availableWidth = UiSharedService.GetWindowContentRegionWidth();
|
||||||
|
var regionHeight = UiSharedService.GetWindowContentRegionHeight();
|
||||||
|
var textSize = ImGui.CalcTextSize(calmMessage, hideTextAfterDoubleHash: false, availableWidth);
|
||||||
|
var xOffset = MathF.Max(0f, (availableWidth - textSize.X) / 2f);
|
||||||
|
var yOffset = MathF.Max(0f, (regionHeight - textSize.Y) / 2f);
|
||||||
|
ImGui.SetCursorPos(new Vector2(regionMin.X + xOffset, regionMin.Y + yOffset));
|
||||||
|
UiSharedService.ColorTextWrapped(calmMessage, ImGuiColors.DalamudGrey3, regionMin.X + availableWidth);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
foreach (var visibleUser in visibleUsers)
|
if (showVisibleCard)
|
||||||
{
|
{
|
||||||
visibleUser.DrawPairedClient();
|
DrawVisibleCard(visibleUsers);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_configService.Current.EnableAutoDetectDiscovery)
|
if (showNearbyCard)
|
||||||
{
|
{
|
||||||
DrawNearbyCard();
|
DrawNearbyCard(nearbyEntriesForDisplay);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -726,9 +744,10 @@ if (showNearby && pendingInvites > 0)
|
|||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
Action? drawVisibleExtras = null;
|
Action? drawVisibleExtras = null;
|
||||||
if (_configService.Current.EnableAutoDetectDiscovery)
|
if (nearbyEntriesForDisplay.Count > 0)
|
||||||
{
|
{
|
||||||
drawVisibleExtras = () => DrawNearbyCard();
|
var entriesForExtras = nearbyEntriesForDisplay;
|
||||||
|
drawVisibleExtras = () => DrawNearbyCard(entriesForExtras);
|
||||||
}
|
}
|
||||||
|
|
||||||
_pairGroupsUi.Draw(visibleUsers, onlineUsers, offlineUsers, drawVisibleExtras);
|
_pairGroupsUi.Draw(visibleUsers, onlineUsers, offlineUsers, drawVisibleExtras);
|
||||||
@@ -737,8 +756,71 @@ if (showNearby && pendingInvites > 0)
|
|||||||
ImGui.EndChild();
|
ImGui.EndChild();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DrawNearbyCard()
|
private List<Services.Mediator.NearbyEntry> GetNearbyEntriesForDisplay()
|
||||||
{
|
{
|
||||||
|
if (_nearbyEntries == null || _nearbyEntries.Count == 0)
|
||||||
|
{
|
||||||
|
return new List<Services.Mediator.NearbyEntry>();
|
||||||
|
}
|
||||||
|
|
||||||
|
return _nearbyEntries
|
||||||
|
.Where(e => e.IsMatch && e.AcceptPairRequests && !string.IsNullOrEmpty(e.Token) && !IsAlreadyPairedQuickMenu(e))
|
||||||
|
.OrderBy(e => e.Distance)
|
||||||
|
.ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DrawVisibleCard(List<DrawUserPair> visibleUsers)
|
||||||
|
{
|
||||||
|
if (visibleUsers.Count == 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ImGuiHelpers.ScaledDummy(4f);
|
||||||
|
using (ImRaii.PushId("group-Visible"))
|
||||||
|
{
|
||||||
|
UiSharedService.DrawCard("visible-card", () =>
|
||||||
|
{
|
||||||
|
bool visibleState = _visibleOpen;
|
||||||
|
UiSharedService.DrawArrowToggle(ref visibleState, "##visible-toggle");
|
||||||
|
if (visibleState != _visibleOpen)
|
||||||
|
{
|
||||||
|
_visibleOpen = visibleState;
|
||||||
|
}
|
||||||
|
|
||||||
|
ImGui.SameLine(0f, 6f * ImGuiHelpers.GlobalScale);
|
||||||
|
ImGui.AlignTextToFramePadding();
|
||||||
|
ImGui.TextUnformatted($"Visible ({visibleUsers.Count})");
|
||||||
|
if (ImGui.IsItemClicked(ImGuiMouseButton.Left))
|
||||||
|
{
|
||||||
|
_visibleOpen = !_visibleOpen;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!_visibleOpen)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ImGuiHelpers.ScaledDummy(4f);
|
||||||
|
var indent = 18f * ImGuiHelpers.GlobalScale;
|
||||||
|
ImGui.Indent(indent);
|
||||||
|
foreach (var visibleUser in visibleUsers)
|
||||||
|
{
|
||||||
|
visibleUser.DrawPairedClient();
|
||||||
|
}
|
||||||
|
ImGui.Unindent(indent);
|
||||||
|
}, stretchWidth: true);
|
||||||
|
}
|
||||||
|
ImGuiHelpers.ScaledDummy(4f);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DrawNearbyCard(IReadOnlyList<Services.Mediator.NearbyEntry> nearbyEntries)
|
||||||
|
{
|
||||||
|
if (nearbyEntries.Count == 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ImGuiHelpers.ScaledDummy(4f);
|
ImGuiHelpers.ScaledDummy(4f);
|
||||||
using (ImRaii.PushId("group-Nearby"))
|
using (ImRaii.PushId("group-Nearby"))
|
||||||
{
|
{
|
||||||
@@ -752,7 +834,7 @@ if (showNearby && pendingInvites > 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ImGui.SameLine(0f, 6f * ImGuiHelpers.GlobalScale);
|
ImGui.SameLine(0f, 6f * ImGuiHelpers.GlobalScale);
|
||||||
var onUmbra = _nearbyEntries?.Count(e => e.IsMatch && e.AcceptPairRequests && !string.IsNullOrEmpty(e.Token) && !IsAlreadyPairedQuickMenu(e)) ?? 0;
|
var onUmbra = nearbyEntries.Count;
|
||||||
ImGui.AlignTextToFramePadding();
|
ImGui.AlignTextToFramePadding();
|
||||||
ImGui.TextUnformatted($"Nearby ({onUmbra})");
|
ImGui.TextUnformatted($"Nearby ({onUmbra})");
|
||||||
if (ImGui.IsItemClicked(ImGuiMouseButton.Left))
|
if (ImGui.IsItemClicked(ImGuiMouseButton.Left))
|
||||||
@@ -768,21 +850,12 @@ if (showNearby && pendingInvites > 0)
|
|||||||
ImGuiHelpers.ScaledDummy(4f);
|
ImGuiHelpers.ScaledDummy(4f);
|
||||||
var indent = 18f * ImGuiHelpers.GlobalScale;
|
var indent = 18f * ImGuiHelpers.GlobalScale;
|
||||||
ImGui.Indent(indent);
|
ImGui.Indent(indent);
|
||||||
var nearby = _nearbyEntries == null
|
foreach (var e in nearbyEntries)
|
||||||
? new List<Services.Mediator.NearbyEntry>()
|
|
||||||
: _nearbyEntries.Where(e => e.IsMatch && e.AcceptPairRequests && !string.IsNullOrEmpty(e.Token) && !IsAlreadyPairedQuickMenu(e))
|
|
||||||
.OrderBy(e => e.Distance)
|
|
||||||
.ToList();
|
|
||||||
if (nearby.Count == 0)
|
|
||||||
{
|
|
||||||
UiSharedService.ColorTextWrapped("Aucun nouveau joueur detecté.", ImGuiColors.DalamudGrey3);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
foreach (var e in nearby)
|
|
||||||
{
|
{
|
||||||
if (!e.AcceptPairRequests || string.IsNullOrEmpty(e.Token))
|
if (!e.AcceptPairRequests || string.IsNullOrEmpty(e.Token))
|
||||||
|
{
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
var name = e.DisplayName ?? e.Name;
|
var name = e.DisplayName ?? e.Name;
|
||||||
ImGui.AlignTextToFramePadding();
|
ImGui.AlignTextToFramePadding();
|
||||||
@@ -814,7 +887,6 @@ if (showNearby && pendingInvites > 0)
|
|||||||
UiSharedService.AttachToolTip("Impossible d'inviter ce joueur");
|
UiSharedService.AttachToolTip("Impossible d'inviter ce joueur");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
ImGui.Unindent(indent);
|
ImGui.Unindent(indent);
|
||||||
}, stretchWidth: true);
|
}, stretchWidth: true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -210,23 +210,47 @@ public class DrawGroupPair : DrawPairBase
|
|||||||
var permIcon = (individualAnimDisabled || individualSoundsDisabled || individualVFXDisabled) ? FontAwesomeIcon.ExclamationTriangle
|
var permIcon = (individualAnimDisabled || individualSoundsDisabled || individualVFXDisabled) ? FontAwesomeIcon.ExclamationTriangle
|
||||||
: ((soundsDisabled || animDisabled || vfxDisabled) ? FontAwesomeIcon.InfoCircle : FontAwesomeIcon.None);
|
: ((soundsDisabled || animDisabled || vfxDisabled) ? FontAwesomeIcon.InfoCircle : FontAwesomeIcon.None);
|
||||||
var runningIconWidth = _uiSharedService.GetIconButtonSize(FontAwesomeIcon.Running).X;
|
var runningIconWidth = _uiSharedService.GetIconButtonSize(FontAwesomeIcon.Running).X;
|
||||||
var infoIconWidth = UiSharedService.GetIconSize(permIcon).X;
|
var infoIconWidth = showInfo && permIcon != FontAwesomeIcon.None ? UiSharedService.GetIconSize(permIcon).X : 0f;
|
||||||
var plusButtonWidth = _uiSharedService.GetIconButtonSize(FontAwesomeIcon.Plus).X;
|
var plusButtonWidth = _uiSharedService.GetIconButtonSize(FontAwesomeIcon.Plus).X;
|
||||||
var pauseIcon = _fullInfoDto.GroupUserPermissions.IsPaused() ? FontAwesomeIcon.Play : FontAwesomeIcon.Pause;
|
var pauseIcon = _fullInfoDto.GroupUserPermissions.IsPaused() ? FontAwesomeIcon.Play : FontAwesomeIcon.Pause;
|
||||||
var pauseButtonWidth = _uiSharedService.GetIconButtonSize(pauseIcon).X;
|
var pauseButtonWidth = _uiSharedService.GetIconButtonSize(pauseIcon).X;
|
||||||
var barButtonWidth = _uiSharedService.GetIconButtonSize(FontAwesomeIcon.Bars).X;
|
var barButtonWidth = _uiSharedService.GetIconButtonSize(FontAwesomeIcon.Bars).X;
|
||||||
|
|
||||||
var pos = ImGui.GetWindowContentRegionMin().X + UiSharedService.GetWindowContentRegionWidth() + spacing
|
float totalWidth = 0f;
|
||||||
- (showShared ? (runningIconWidth + spacing) : 0)
|
void Accumulate(bool condition, float width)
|
||||||
- (showInfo ? (infoIconWidth + spacing) : 0)
|
{
|
||||||
- (showPlus ? (plusButtonWidth + spacing) : 0)
|
if (!condition || width <= 0f) return;
|
||||||
- (showPause ? (pauseButtonWidth + spacing) : 0)
|
if (totalWidth > 0f) totalWidth += spacing;
|
||||||
- (showBars ? (barButtonWidth + spacing) : 0);
|
totalWidth += width;
|
||||||
|
}
|
||||||
|
|
||||||
ImGui.SameLine(pos);
|
Accumulate(showShared, runningIconWidth);
|
||||||
|
Accumulate(showInfo && infoIconWidth > 0f, infoIconWidth);
|
||||||
|
Accumulate(showPlus, plusButtonWidth);
|
||||||
|
Accumulate(showPause, pauseButtonWidth);
|
||||||
|
if (showBars)
|
||||||
|
{
|
||||||
|
if (totalWidth > 0f) totalWidth += spacing;
|
||||||
|
totalWidth += barButtonWidth;
|
||||||
|
}
|
||||||
|
if (showPause && showBars)
|
||||||
|
{
|
||||||
|
totalWidth -= spacing * 0.5f;
|
||||||
|
if (totalWidth < 0f) totalWidth = 0f;
|
||||||
|
}
|
||||||
|
|
||||||
|
float cardPaddingX = UiSharedService.GetCardContentPaddingX();
|
||||||
|
float rightMargin = cardPaddingX + 6f * ImGuiHelpers.GlobalScale;
|
||||||
|
float baseX = MathF.Max(ImGui.GetCursorPosX(),
|
||||||
|
ImGui.GetWindowContentRegionMin().X + UiSharedService.GetWindowContentRegionWidth() - rightMargin - totalWidth);
|
||||||
|
float currentX = baseX;
|
||||||
|
|
||||||
|
ImGui.SameLine();
|
||||||
|
ImGui.SetCursorPosX(baseX);
|
||||||
|
|
||||||
if (showShared)
|
if (showShared)
|
||||||
{
|
{
|
||||||
|
ImGui.SetCursorPosY(textPosY);
|
||||||
_uiSharedService.IconText(FontAwesomeIcon.Running);
|
_uiSharedService.IconText(FontAwesomeIcon.Running);
|
||||||
|
|
||||||
UiSharedService.AttachToolTip($"This user has shared {sharedData!.Count} Character Data Sets with you." + UiSharedService.TooltipSeparator
|
UiSharedService.AttachToolTip($"This user has shared {sharedData!.Count} Character Data Sets with you." + UiSharedService.TooltipSeparator
|
||||||
@@ -236,12 +260,15 @@ public class DrawGroupPair : DrawPairBase
|
|||||||
{
|
{
|
||||||
_mediator.Publish(new OpenCharaDataHubWithFilterMessage(_pair.UserData));
|
_mediator.Publish(new OpenCharaDataHubWithFilterMessage(_pair.UserData));
|
||||||
}
|
}
|
||||||
ImGui.SameLine();
|
currentX += runningIconWidth + spacing;
|
||||||
|
ImGui.SetCursorPosX(currentX);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (individualAnimDisabled || individualSoundsDisabled)
|
if (showInfo && infoIconWidth > 0f)
|
||||||
{
|
{
|
||||||
ImGui.SetCursorPosY(textPosY);
|
ImGui.SetCursorPosY(textPosY);
|
||||||
|
if (individualAnimDisabled || individualSoundsDisabled)
|
||||||
|
{
|
||||||
ImGui.PushStyleColor(ImGuiCol.Text, ImGuiColors.DalamudYellow);
|
ImGui.PushStyleColor(ImGuiCol.Text, ImGuiColors.DalamudYellow);
|
||||||
_uiSharedService.IconText(permIcon);
|
_uiSharedService.IconText(permIcon);
|
||||||
ImGui.PopStyleColor();
|
ImGui.PopStyleColor();
|
||||||
@@ -286,11 +313,9 @@ public class DrawGroupPair : DrawPairBase
|
|||||||
|
|
||||||
ImGui.EndTooltip();
|
ImGui.EndTooltip();
|
||||||
}
|
}
|
||||||
ImGui.SameLine();
|
|
||||||
}
|
}
|
||||||
else if ((animDisabled || soundsDisabled))
|
else
|
||||||
{
|
{
|
||||||
ImGui.SetCursorPosY(textPosY);
|
|
||||||
_uiSharedService.IconText(permIcon);
|
_uiSharedService.IconText(permIcon);
|
||||||
if (ImGui.IsItemHovered())
|
if (ImGui.IsItemHovered())
|
||||||
{
|
{
|
||||||
@@ -324,7 +349,10 @@ public class DrawGroupPair : DrawPairBase
|
|||||||
|
|
||||||
ImGui.EndTooltip();
|
ImGui.EndTooltip();
|
||||||
}
|
}
|
||||||
ImGui.SameLine();
|
}
|
||||||
|
|
||||||
|
currentX += infoIconWidth + spacing;
|
||||||
|
ImGui.SetCursorPosX(currentX);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (showPlus)
|
if (showPlus)
|
||||||
@@ -340,13 +368,14 @@ public class DrawGroupPair : DrawPairBase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
UiSharedService.AttachToolTip(AppendSeenInfo("Send pairing invite to " + entryUID));
|
UiSharedService.AttachToolTip(AppendSeenInfo("Send pairing invite to " + entryUID));
|
||||||
ImGui.SameLine();
|
currentX += plusButtonWidth + spacing;
|
||||||
|
ImGui.SetCursorPosX(currentX);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (showPause)
|
if (showPause)
|
||||||
{
|
{
|
||||||
|
float gapToBars = showBars ? spacing * 0.5f : spacing;
|
||||||
ImGui.SetCursorPosY(originalY);
|
ImGui.SetCursorPosY(originalY);
|
||||||
|
|
||||||
if (_uiSharedService.IconButton(pauseIcon))
|
if (_uiSharedService.IconButton(pauseIcon))
|
||||||
{
|
{
|
||||||
var newPermissions = _fullInfoDto.GroupUserPermissions ^ GroupUserPermissions.Paused;
|
var newPermissions = _fullInfoDto.GroupUserPermissions ^ GroupUserPermissions.Paused;
|
||||||
@@ -355,19 +384,20 @@ public class DrawGroupPair : DrawPairBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
UiSharedService.AttachToolTip(AppendSeenInfo((_fullInfoDto.GroupUserPermissions.IsPaused() ? "Resume" : "Pause") + " syncing with " + entryUID));
|
UiSharedService.AttachToolTip(AppendSeenInfo((_fullInfoDto.GroupUserPermissions.IsPaused() ? "Resume" : "Pause") + " syncing with " + entryUID));
|
||||||
ImGui.SameLine();
|
currentX += pauseButtonWidth + gapToBars;
|
||||||
|
ImGui.SetCursorPosX(currentX);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (showBars)
|
if (showBars)
|
||||||
{
|
{
|
||||||
ImGui.SetCursorPosY(originalY);
|
ImGui.SetCursorPosY(originalY);
|
||||||
|
|
||||||
if (_uiSharedService.IconButton(FontAwesomeIcon.Bars))
|
if (_uiSharedService.IconButton(FontAwesomeIcon.Bars))
|
||||||
{
|
{
|
||||||
ImGui.OpenPopup("Popup");
|
ImGui.OpenPopup("Syncshell Flyout Menu");
|
||||||
}
|
}
|
||||||
|
currentX += barButtonWidth;
|
||||||
|
ImGui.SetCursorPosX(currentX);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ImGui.BeginPopup("Popup"))
|
if (ImGui.BeginPopup("Popup"))
|
||||||
{
|
{
|
||||||
if ((userIsModerator || userIsOwner) && !(entryIsMod || entryIsOwner))
|
if ((userIsModerator || userIsOwner) && !(entryIsMod || entryIsOwner))
|
||||||
@@ -453,7 +483,7 @@ public class DrawGroupPair : DrawPairBase
|
|||||||
ImGui.EndPopup();
|
ImGui.EndPopup();
|
||||||
}
|
}
|
||||||
|
|
||||||
return pos - spacing;
|
return baseX - spacing;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string AppendSeenInfo(string tooltip)
|
private string AppendSeenInfo(string tooltip)
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ public class DrawUserPair : DrawPairBase
|
|||||||
var barButtonSize = _uiSharedService.GetIconButtonSize(FontAwesomeIcon.Bars);
|
var barButtonSize = _uiSharedService.GetIconButtonSize(FontAwesomeIcon.Bars);
|
||||||
var entryUID = _pair.UserData.AliasOrUID;
|
var entryUID = _pair.UserData.AliasOrUID;
|
||||||
var spacingX = ImGui.GetStyle().ItemSpacing.X;
|
var spacingX = ImGui.GetStyle().ItemSpacing.X;
|
||||||
var edgePadding = ImGui.GetStyle().WindowPadding.X + 4f * ImGuiHelpers.GlobalScale;
|
var edgePadding = UiSharedService.GetCardContentPaddingX() + 6f * ImGuiHelpers.GlobalScale;
|
||||||
var windowEndX = ImGui.GetWindowContentRegionMin().X + UiSharedService.GetWindowContentRegionWidth() - edgePadding;
|
var windowEndX = ImGui.GetWindowContentRegionMin().X + UiSharedService.GetWindowContentRegionWidth() - edgePadding;
|
||||||
var rightSidePos = windowEndX - barButtonSize.X;
|
var rightSidePos = windowEndX - barButtonSize.X;
|
||||||
|
|
||||||
|
|||||||
@@ -646,7 +646,8 @@ internal sealed class GroupPanel
|
|||||||
var isOwner = string.Equals(groupDto.OwnerUID, ApiController.UID, StringComparison.Ordinal);
|
var isOwner = string.Equals(groupDto.OwnerUID, ApiController.UID, StringComparison.Ordinal);
|
||||||
|
|
||||||
var spacingX = ImGui.GetStyle().ItemSpacing.X;
|
var spacingX = ImGui.GetStyle().ItemSpacing.X;
|
||||||
var windowEndX = ImGui.GetWindowContentRegionMin().X + UiSharedService.GetWindowContentRegionWidth();
|
var cardPaddingX = UiSharedService.GetCardContentPaddingX();
|
||||||
|
var windowEndX = ImGui.GetWindowContentRegionMin().X + UiSharedService.GetWindowContentRegionWidth() - cardPaddingX - 6f * ImGuiHelpers.GlobalScale;
|
||||||
var pauseIcon = groupDto.GroupUserPermissions.IsPaused() ? FontAwesomeIcon.Play : FontAwesomeIcon.Pause;
|
var pauseIcon = groupDto.GroupUserPermissions.IsPaused() ? FontAwesomeIcon.Play : FontAwesomeIcon.Pause;
|
||||||
var pauseIconSize = _uiShared.GetIconButtonSize(pauseIcon);
|
var pauseIconSize = _uiShared.GetIconButtonSize(pauseIcon);
|
||||||
|
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
|
|||||||
{
|
{
|
||||||
e.OnPreBuild(tk => tk.AddDalamudAssetFont(Dalamud.DalamudAsset.NotoSansJpMedium, new()
|
e.OnPreBuild(tk => tk.AddDalamudAssetFont(Dalamud.DalamudAsset.NotoSansJpMedium, new()
|
||||||
{
|
{
|
||||||
SizePx = 35,
|
SizePx = 27,
|
||||||
GlyphRanges = [0x20, 0x7E, 0]
|
GlyphRanges = [0x20, 0x7E, 0]
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
@@ -349,6 +349,12 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
|
|||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static float GetCardContentPaddingX()
|
||||||
|
{
|
||||||
|
var style = ImGui.GetStyle();
|
||||||
|
return style.FramePadding.X + 4f * ImGuiHelpers.GlobalScale;
|
||||||
|
}
|
||||||
|
|
||||||
public static void DrawGroupedCenteredColorText(string text, Vector4 color, float? maxWidth = null)
|
public static void DrawGroupedCenteredColorText(string text, Vector4 color, float? maxWidth = null)
|
||||||
{
|
{
|
||||||
var availWidth = ImGui.GetContentRegionAvail().X;
|
var availWidth = ImGui.GetContentRegionAvail().X;
|
||||||
|
|||||||
Reference in New Issue
Block a user