fix window size
This commit is contained in:
@@ -61,7 +61,13 @@ public class SelectGroupForPairUi
|
||||
return;
|
||||
}
|
||||
|
||||
var name = PairName(showUidForEntry, _pair.OtherUID);
|
||||
// Is the popup not supposed to show? Set _opened to false so we can re-open it.
|
||||
if (!_show)
|
||||
{
|
||||
_opened = false;
|
||||
}
|
||||
|
||||
var name = PairName(showUidForEntry, _pair.OtherUID, _pair.VanityUID);
|
||||
var popupName = $"Choose Groups for {name}";
|
||||
// Is the popup supposed to show but did not open yet? Open it
|
||||
if (_show && !_opened)
|
||||
@@ -70,12 +76,6 @@ public class SelectGroupForPairUi
|
||||
_opened = true;
|
||||
}
|
||||
|
||||
// Is the popup not supposed to show? Set _opened to false so we can re-open it.
|
||||
if (!_show)
|
||||
{
|
||||
_opened = false;
|
||||
}
|
||||
|
||||
if (ImGui.BeginPopupModal(popupName, ref _show, UiShared.PopupWindowFlags))
|
||||
{
|
||||
UiShared.FontText($"Select the groups you want {name} to be in.", UiBuilder.DefaultFont);
|
||||
@@ -136,17 +136,13 @@ public class SelectGroupForPairUi
|
||||
}
|
||||
}
|
||||
|
||||
private string PairName(Dictionary<string, bool> showUidForEntry, string otherUid)
|
||||
private string PairName(Dictionary<string, bool> showUidForEntry, string otherUid, string vanityUid)
|
||||
{
|
||||
showUidForEntry.TryGetValue(otherUid, out var showUidInsteadOfName);
|
||||
_configuration.GetCurrentServerUidComments().TryGetValue(otherUid, out var playerText);
|
||||
if (showUidInsteadOfName)
|
||||
if (showUidInsteadOfName || string.IsNullOrEmpty(playerText))
|
||||
{
|
||||
playerText = otherUid;
|
||||
}
|
||||
else if (string.IsNullOrEmpty(playerText))
|
||||
{
|
||||
playerText = otherUid;
|
||||
playerText = string.IsNullOrEmpty(vanityUid) ? otherUid : vanityUid;
|
||||
}
|
||||
return playerText;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user