don't show pause button when not synced

This commit is contained in:
Stanley Dimant
2022-07-17 22:39:39 +02:00
parent df53bd9559
commit 136fc32e1e

View File

@@ -245,16 +245,19 @@ namespace MareSynchronos.UI
} }
UiShared.AttachToolTip("Hold CTRL and click to unpair permanently from " + entry.OtherUID); UiShared.AttachToolTip("Hold CTRL and click to unpair permanently from " + entry.OtherUID);
if (entry.IsSynced)
{
ImGui.SameLine(ImGui.GetWindowContentRegionMin().X + UiShared.GetWindowContentRegionWidth() - buttonSize.X - ImGui.GetStyle().ItemSpacing.X - trashButtonSize.X); ImGui.SameLine(ImGui.GetWindowContentRegionMin().X + UiShared.GetWindowContentRegionWidth() - buttonSize.X - ImGui.GetStyle().ItemSpacing.X - trashButtonSize.X);
ImGui.SetCursorPosY(originalY); ImGui.SetCursorPosY(originalY);
if (ImGuiComponents.IconButton(pauseIcon)) if (ImGuiComponents.IconButton(pauseIcon))
{ {
_ = _apiController.SendPairedClientPauseChange(entry.OtherUID, !entry.IsPaused); _ = _apiController.SendPairedClientPauseChange(entry.OtherUID, !entry.IsPaused);
} }
UiShared.AttachToolTip(entry.IsPaused UiShared.AttachToolTip(!entry.IsPaused
? "Pause pairing with " + entry.OtherUID ? "Pause pairing with " + entry.OtherUID
: "Resume pairing with " + entry.OtherUID); : "Resume pairing with " + entry.OtherUID);
} }
}
private void DrawPairList() private void DrawPairList()
{ {