1
0
Fork 0

Change how stop button is drawn if no quest is active

master
Liza 2024-07-27 00:47:46 +02:00
parent 6e6ce6fb56
commit 9422b47cc5
Signed by: liza
GPG Key ID: 7199F8D727D55F67
2 changed files with 8 additions and 13 deletions

View File

@ -79,7 +79,7 @@ internal sealed class ActiveQuestComponent
ImGui.Text(_questController.ToStatString());
//ImGui.EndDisabled();
DrawQuestIcons(currentQuest, currentStep, questWork);
DrawQuestButtons(currentQuest, currentStep, questWork);
DrawSimulationControls();
}
@ -87,6 +87,12 @@ internal sealed class ActiveQuestComponent
{
ImGui.Text("No active quest");
ImGui.TextColored(ImGuiColors.DalamudGrey, $"{_questRegistry.Count} quests loaded");
if (ImGuiComponents.IconButton(FontAwesomeIcon.Stop))
{
_movementController.Stop();
_questController.Stop("Manual (no active quest)");
}
}
}
@ -199,7 +205,7 @@ internal sealed class ActiveQuestComponent
return questWork;
}
private void DrawQuestIcons(QuestController.QuestProgress currentQuest, QuestStep? currentStep,
private void DrawQuestButtons(QuestController.QuestProgress currentQuest, QuestStep? currentStep,
QuestWork? questWork)
{
ImGui.BeginDisabled(_questController.IsRunning);

View File

@ -64,17 +64,6 @@ internal sealed class QuickAccessButtonsComponent
}
}
ImGui.SameLine();
using (var unused = ImRaii.Disabled(!_movementController.IsPathRunning))
{
if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.StopCircle, "Stop"))
{
_movementController.Stop();
_questController.Stop("Manual");
}
}
if (_commandManager.Commands.ContainsKey("/vnav"))
{
ImGui.SameLine();