don't display shard if shardname is not set

This commit is contained in:
Stanley Dimant
2022-10-04 02:02:11 +02:00
parent 7f089f458c
commit d6a434b2f0

View File

@@ -472,7 +472,7 @@ public class CompactUi : Window, IDisposable
ImGui.PopStyleColor(); ImGui.PopStyleColor();
UiShared.AttachToolTip(!_configuration.FullPause ? "Disconnect from " + _apiController.ServerDictionary[_configuration.ApiUri] : "Connect to " + _apiController.ServerDictionary[_configuration.ApiUri]); UiShared.AttachToolTip(!_configuration.FullPause ? "Disconnect from " + _apiController.ServerDictionary[_configuration.ApiUri] : "Connect to " + _apiController.ServerDictionary[_configuration.ApiUri]);
if (!string.IsNullOrEmpty(shardConnection)) if (!string.IsNullOrEmpty(_apiController.ServerInfo.ShardName))
{ {
ImGui.SetCursorPosX((ImGui.GetWindowContentRegionMin().X + UiShared.GetWindowContentRegionWidth()) / 2 - shardTextSize.X / 2); ImGui.SetCursorPosX((ImGui.GetWindowContentRegionMin().X + UiShared.GetWindowContentRegionWidth()) / 2 - shardTextSize.X / 2);
ImGui.TextUnformatted(shardConnection); ImGui.TextUnformatted(shardConnection);