From 9cef8c160fc7a8ad7c47249146d95bba94b38337 Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Fri, 16 Aug 2024 22:34:59 +0200 Subject: [PATCH] Conditionally disable some UI buttons --- .../Windows/QuestComponents/CreationUtilsComponent.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Questionable/Windows/QuestComponents/CreationUtilsComponent.cs b/Questionable/Windows/QuestComponents/CreationUtilsComponent.cs index 52bcd6592..33fa831c8 100644 --- a/Questionable/Windows/QuestComponents/CreationUtilsComponent.cs +++ b/Questionable/Windows/QuestComponents/CreationUtilsComponent.cs @@ -148,7 +148,7 @@ internal sealed class CreationUtilsComponent ImGui.SameLine(); ImGui.Text($"QM: {gameObject->NamePlateIconId}"); - ImGui.BeginDisabled(!_movementController.IsNavmeshReady); + ImGui.BeginDisabled(!_movementController.IsNavmeshReady || _gameFunctions.IsOccupied()); if (!_movementController.IsPathfinding) { if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Bullseye, "To Target")) @@ -177,6 +177,7 @@ internal sealed class CreationUtilsComponent ImGui.EndDisabled(); + ImGui.BeginDisabled(_gameFunctions.IsOccupied()); ImGui.SameLine(); bool interact = ImGuiComponents.IconButton(FontAwesomeIcon.MousePointer); if (ImGui.IsItemHovered()) @@ -187,7 +188,7 @@ internal sealed class CreationUtilsComponent (GameObject*)_targetManager.Target.Address, false); _logger.LogInformation("XXXXX Interaction Result: {Result}", result); } - + ImGui.EndDisabled(); ImGui.SameLine(); bool copy = ImGuiComponents.IconButton(FontAwesomeIcon.Copy);