From 7ae308fd4e20e0ae970bebab399c73a045130663 Mon Sep 17 00:00:00 2001 From: xPumaa <35280763+xPumaa@users.noreply.github.com> Date: Fri, 7 Oct 2022 21:01:41 +0200 Subject: [PATCH] Plus button + bar button are now correctly shown for moderators --- MareSynchronos/UI/GroupPanel.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/MareSynchronos/UI/GroupPanel.cs b/MareSynchronos/UI/GroupPanel.cs index 88cb481..231b2af 100644 --- a/MareSynchronos/UI/GroupPanel.cs +++ b/MareSynchronos/UI/GroupPanel.cs @@ -629,7 +629,10 @@ namespace MareSynchronos.UI if (plusButtonShown) { ImGui.SetCursorPosY(originalY); - ImGui.SameLine(ImGui.GetWindowContentRegionMin().X + UiShared.GetWindowContentRegionWidth() - plusButtonSize.X - (isOwner ? barButtonSize.X + ImGui.GetStyle().ItemSpacing.X : 0)); + var barWidth = isOwner || (isModerator && !userIsMod && !userIsOwner) + ? barButtonSize.X + ImGui.GetStyle().ItemSpacing.X + : 0; + ImGui.SameLine(ImGui.GetWindowContentRegionMin().X + UiShared.GetWindowContentRegionWidth() - plusButtonSize.X - barWidth); if (ImGuiComponents.IconButton(FontAwesomeIcon.Plus)) { @@ -641,7 +644,6 @@ namespace MareSynchronos.UI if (isOwner || (isModerator && !userIsMod && !userIsOwner)) { ImGui.SetCursorPosY(originalY); - var subtractedWidth = plusButtonShown ? (plusButtonSize.X) : 0; ImGui.SameLine(ImGui.GetWindowContentRegionMin().X + UiShared.GetWindowContentRegionWidth() - barButtonSize.X); if (ImGuiComponents.IconButton(FontAwesomeIcon.Bars))