From 02516e7df900f21f2f77d968dd4188ff430eead5 Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Sun, 10 Aug 2025 20:22:58 +0200 Subject: [PATCH] Fix wrong menu type for right-clicking quests in journal --- .../JournalComponents/QuestJournalUtils.cs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Questionable/Windows/JournalComponents/QuestJournalUtils.cs b/Questionable/Windows/JournalComponents/QuestJournalUtils.cs index 37c51862..dc29a50a 100644 --- a/Questionable/Windows/JournalComponents/QuestJournalUtils.cs +++ b/Questionable/Windows/JournalComponents/QuestJournalUtils.cs @@ -32,16 +32,22 @@ internal sealed class QuestJournalUtils if (!popup) return; - if (ImGui.MenuItem("Start as next quest", _questFunctions.IsReadyToAcceptQuest(questInfo.QuestId))) + using (ImRaii.Disabled(!_questFunctions.IsReadyToAcceptQuest(questInfo.QuestId))) { - _questController.SetNextQuest(quest); - _questController.Start(label); + if (ImGui.MenuItem("Start as next quest")) + { + _questController.SetNextQuest(quest); + _questController.Start(label); + } } bool openInQuestMap = _commandManager.Commands.ContainsKey("/questinfo"); - if (ImGui.MenuItem("View in Quest Map", questInfo.QuestId is QuestId && openInQuestMap)) + using (ImRaii.Disabled(!(questInfo.QuestId is QuestId) || !openInQuestMap)) { - _commandManager.ProcessCommand($"/questinfo {questInfo.QuestId}"); + if (ImGui.MenuItem("View in Quest Map")) + { + _commandManager.ProcessCommand($"/questinfo {questInfo.QuestId}"); + } } } -- 2.30.2