Partial roll-up to reduce code divergence

Co-authored-by: rootdarkarchon <root.darkarchon@outlook.com>
This commit is contained in:
Loporrit
2025-02-15 23:07:46 +00:00
parent 324288652d
commit 7a8de7add6
41 changed files with 963 additions and 464 deletions

View File

@@ -74,11 +74,15 @@ public class DrawGroupPair : DrawPairBase
{
_mediator.Publish(new TargetPairMessage(_pair));
}
if (_pair.LastAppliedDataSize >= 0)
if (_pair.LastAppliedDataBytes >= 0)
{
presenceText += UiSharedService.TooltipSeparator;
presenceText += ((!_pair.IsVisible) ? "(Last) " : string.Empty) + "Mods Info" + Environment.NewLine;
presenceText += "Files Size: " + UiSharedService.ByteToString(_pair.LastAppliedDataSize, true);
presenceText += "Files Size: " + UiSharedService.ByteToString(_pair.LastAppliedDataBytes, true);
if (_pair.LastAppliedApproximateVRAMBytes >= 0)
{
presenceText += Environment.NewLine + "Approx. VRAM Usage: " + UiSharedService.ByteToString(_pair.LastAppliedApproximateVRAMBytes, true);
}
if (_pair.LastAppliedDataTris >= 0)
{
presenceText += Environment.NewLine + "Triangle Count (excl. Vanilla): "

View File

@@ -72,16 +72,20 @@ public class DrawUserPair : DrawPairBase
}
ImGui.PopFont();
var visibleTooltip = _pair.UserData.AliasOrUID + " is visible: " + _pair.PlayerName! + Environment.NewLine + "Click to target this player";
if (_pair.LastAppliedDataSize >= 0)
if (_pair.LastAppliedDataBytes >= 0)
{
visibleTooltip += UiSharedService.TooltipSeparator;
visibleTooltip += ((!_pair.IsVisible) ? "(Last) " : string.Empty) + "Mods Info" + Environment.NewLine;
visibleTooltip += "Files Size: " + UiSharedService.ByteToString(_pair.LastAppliedDataSize, true);
visibleTooltip += "Files Size: " + UiSharedService.ByteToString(_pair.LastAppliedDataBytes, true);
if (_pair.LastAppliedApproximateVRAMBytes >= 0)
{
visibleTooltip += Environment.NewLine + "Approx. VRAM Usage: " + UiSharedService.ByteToString(_pair.LastAppliedApproximateVRAMBytes, true);
}
if (_pair.LastAppliedDataTris >= 0)
{
visibleTooltip += Environment.NewLine + "Triangle Count (excl. Vanilla): "
+ (_pair.LastAppliedDataTris > 1000 ? (_pair.LastAppliedDataTris / 1000d).ToString("0.0'k'") : _pair.LastAppliedDataTris);
}
}
}
UiSharedService.AttachToolTip(visibleTooltip);
@@ -273,16 +277,5 @@ public class DrawUserPair : DrawPairBase
_ = _apiController.UserRemovePair(new(entry.UserData));
}
UiSharedService.AttachToolTip("Hold CTRL and click to unpair permanently from " + entryUID);
ImGui.Separator();
if (!entry.IsPaused)
{
if (UiSharedService.NormalizedIconTextButton(FontAwesomeIcon.ExclamationTriangle, "Report Profile"))
{
ImGui.CloseCurrentPopup();
_mediator.Publish(new OpenReportPopupMessage(_pair));
}
UiSharedService.AttachToolTip("Report this users profile to the administrative team");
}
}
}