From c196cdd344ac6c8fc8d081cbca22e4bc4b2410a7 Mon Sep 17 00:00:00 2001 From: rootdarkarchon Date: Fri, 10 Nov 2023 00:40:46 +0100 Subject: [PATCH] fix staging issues --- MareSynchronos/UI/CompactUI.cs | 17 ++++++++++++++--- MareSynchronos/UI/SettingsUi.cs | 5 +++-- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/MareSynchronos/UI/CompactUI.cs b/MareSynchronos/UI/CompactUI.cs index 15b5ea9..1be869c 100644 --- a/MareSynchronos/UI/CompactUI.cs +++ b/MareSynchronos/UI/CompactUI.cs @@ -1,6 +1,5 @@ using Dalamud.Interface; using Dalamud.Interface.Colors; -using Dalamud.Interface.Components; using Dalamud.Interface.Utility; using Dalamud.Interface.Utility.Raii; using Dalamud.Utility; @@ -69,7 +68,8 @@ public class CompactUi : WindowMediatorSubscriberBase _selectPairsForGroupUi = selectPairForTagUi; _tabMenu = new TopTabMenu(Mediator, _apiController, _pairManager); - AllowPinning = false; + // todo: reenable when dalamud title bar buttons are out of staging + /*AllowPinning = false; AllowClickthrough = false; TitleBarButtons = new() { @@ -82,7 +82,7 @@ public class CompactUi : WindowMediatorSubscriberBase }, IconOffset = new(2,1) } - }; + };*/ _drawFolders = GetDrawFolders().ToList(); @@ -371,6 +371,17 @@ public class CompactUi : WindowMediatorSubscriberBase } UiSharedService.AttachToolTip("Click to copy"); + // todo: remove when dalamud title bar buttons are out of staging + ImGui.SetWindowFontScale(1.5f); + var buttonSize = UiSharedService.GetIconButtonSize(FontAwesomeIcon.Cog); + ImGui.SameLine(); + ImGui.SetCursorPosX(ImGui.GetWindowContentRegionMax().X - buttonSize.X); + if (UiSharedService.NormalizedIconButton(FontAwesomeIcon.Cog)) + { + Mediator.Publish(new UiToggleMessage(typeof(SettingsUi))); + } + ImGui.SetWindowFontScale(1.0f); + if (!string.Equals(_apiController.DisplayName, _apiController.UID, StringComparison.Ordinal)) { var origTextSize = ImGui.CalcTextSize(_apiController.UID); diff --git a/MareSynchronos/UI/SettingsUi.cs b/MareSynchronos/UI/SettingsUi.cs index 1d7cc0b..fea0a6c 100644 --- a/MareSynchronos/UI/SettingsUi.cs +++ b/MareSynchronos/UI/SettingsUi.cs @@ -69,8 +69,9 @@ public class SettingsUi : WindowMediatorSubscriberBase _apiController = apiController; _fileCompactor = fileCompactor; _uiShared = uiShared; - AllowClickthrough = false; - AllowPinning = false; + // todo: reenable when dalamud is out of staging + /*AllowClickthrough = false; + AllowPinning = false;*/ SizeConstraints = new WindowSizeConstraints() {