Sort syncshells by VRAM usage
This commit is contained in:
@@ -20,6 +20,7 @@ public class DrawGroupPair : DrawPairBase
|
||||
private readonly GroupPairFullInfoDto _fullInfoDto;
|
||||
private readonly GroupFullInfoDto _group;
|
||||
private readonly CharaDataManager _charaDataManager;
|
||||
public long _VRAMBytes;
|
||||
|
||||
public DrawGroupPair(string id, Pair entry, ApiController apiController,
|
||||
MareMediator mareMediator, GroupFullInfoDto group, GroupPairFullInfoDto fullInfoDto,
|
||||
@@ -80,11 +81,13 @@ public class DrawGroupPair : DrawPairBase
|
||||
}
|
||||
if (_pair.LastAppliedDataBytes >= 0)
|
||||
{
|
||||
|
||||
presenceText += UiSharedService.TooltipSeparator;
|
||||
presenceText += ((!_pair.IsVisible) ? "(Last) " : string.Empty) + "Mods Info" + Environment.NewLine;
|
||||
presenceText += "Files Size: " + UiSharedService.ByteToString(_pair.LastAppliedDataBytes, true);
|
||||
if (_pair.LastAppliedApproximateVRAMBytes >= 0)
|
||||
{
|
||||
_VRAMBytes = _pair.LastAppliedApproximateVRAMBytes;
|
||||
presenceText += Environment.NewLine + "Approx. VRAM Usage: " + UiSharedService.ByteToString(_pair.LastAppliedApproximateVRAMBytes, true);
|
||||
}
|
||||
if (_pair.LastAppliedDataTris >= 0)
|
||||
|
@@ -452,7 +452,16 @@ internal sealed class GroupPanel
|
||||
{
|
||||
ImGui.TextUnformatted("Visible");
|
||||
ImGui.Separator();
|
||||
_uidDisplayHandler.RenderPairList(visibleUsers);
|
||||
if (_mareConfig.Current.SortSyncshellsByVRAM)
|
||||
{
|
||||
List<DrawGroupPair> sortedVisibleUsers = visibleUsers.OrderBy(o=>o._VRAMBytes).ToList();
|
||||
_uidDisplayHandler.RenderPairList(sortedVisibleUsers);
|
||||
}
|
||||
else
|
||||
{
|
||||
_uidDisplayHandler.RenderPairList(visibleUsers);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (onlineUsers.Count > 0)
|
||||
|
Reference in New Issue
Block a user