From: Liza Carvelli Date: Sun, 10 Aug 2025 18:22:58 +0000 (+0200) Subject: Fix wrong menu type for right-clicking quests in journal X-Git-Tag: v6.0~3 X-Git-Url: https://git.jacobcasper.com/?a=commitdiff_plain;h=02516e7df900f21f2f77d968dd4188ff430eead5;p=Questionable.git Fix wrong menu type for right-clicking quests in journal --- 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}"); + } } }