Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
- Feature: added "instant" quests (So You Want To Be A Questionable User) to Journal Progress > Other Quests > Special Quests > Instant Quests -alydev
- the "Instant Quests" label can be right clicked to select "Add all to priority quests", this will let users run all available one-step quasi-quests in one go (in theory!)
- bug fix: don't apply NG+ label to Instant Quests category; sort by quest ID -alydev
- Feature: replaced button labels (visible on hover) to quick access buttons -alydev
- Feature: Adjusted quest window buttons -alydev
- Change: show Remaining Tasks dropdown (if enabled) even if 0 tasks -alydev
2 changes: 1 addition & 1 deletion Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup Condition="$(MSBuildProjectName) != 'GatheringPathRenderer'">
<Version>15.306.1.11</Version>
<Version>15.306.1.12</Version>
</PropertyGroup>

<PropertyGroup>
Expand Down
24 changes: 16 additions & 8 deletions Questionable/Windows/Common/Ui/QstWidgets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,18 +134,22 @@ public static bool Chip(string text, Vector4 color)

// Icon button with a tooltip and an optional count badge.
public static bool RailButton(FontAwesomeIcon icon, string label, string? tooltip = null, Vector4? tint = null,
bool enabled = true, string? countBadge = null, Vector4? badgeColor = null,
bool enabled = true, string? countBadge = null, Vector4? badgeColor = null, bool showLabel = false,
[CallerFilePath] string file = "", [CallerLineNumber] int line = 0)
{
float size = ImGui.GetFrameHeight();
bool clicked;
using (ImRaii.Disabled(!enabled))
{
clicked = ImGuiComponentsLocal.IconButton(icon, tint, activeColor: null, hoveredColor: null,
new Vector2(size, size), file, line);
if (showLabel)
clicked = ImGuiComponentsLocal.IconButtonWithText(icon, label, tint, activeColor: null, hoveredColor: null,
file: file, line: line);
else
clicked = ImGuiComponentsLocal.IconButton(icon, tint, activeColor: null, hoveredColor: null,
new Vector2(size, size), file, line);
}

if (countBadge != null)
if (!showLabel && countBadge != null)
{
Vector2 max = ImGui.GetItemRectMax();
Vector2 badgeSize = ImGui.CalcTextSize(countBadge);
Expand All @@ -155,10 +159,14 @@ public static bool RailButton(FontAwesomeIcon icon, string label, string? toolti

if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled))
{
using ImRaii.TooltipDisposable _ = ImRaii.Tooltip();
if (tooltip?.Length != 0)
tooltip = $"\n{tooltip}";
ImGui.TextUnformatted($"{label}{tooltip}");
if (showLabel && tooltip?.Length != 0)
ImGui.SetTooltip(tooltip);
else
{
if (tooltip?.Length != 0)
tooltip = $"\n{tooltip}";
ImGui.SetTooltip($"{label}{tooltip}");
}
}

return clicked && enabled;
Expand Down
277 changes: 142 additions & 135 deletions Questionable/Windows/QuestComponents/ActiveQuestComponent.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
using FFXIVClientStructs.FFXIV.Client.Game.UI;
using Questionable.Model.Common;
using Questionable.Model.Questing;
using ObjectKind = Dalamud.Game.ClientState.Objects.Enums.ObjectKind;
using Questionable.Windows.Common.Ui;
using ObjectKind = Dalamud.Game.ClientState.Objects.Enums.ObjectKind;

namespace Questionable.Windows.QuestComponents;

Expand Down
40 changes: 20 additions & 20 deletions Questionable/Windows/QuestComponents/QuickAccessButtonsComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
using Dalamud.Bindings.ImGui;
using Dalamud.Game.ClientState.Objects.SubKinds;
using Dalamud.Interface;
using Dalamud.Interface.Utility;
using Dalamud.Interface.Utility.Raii;
using Questionable.Controller.Steps.Shared;
using Questionable.Model.Questing;
using Questionable.Windows.Common.Ui;
Expand All @@ -28,15 +26,9 @@ internal sealed class QuickAccessButtonsComponent

public void Draw()
{
DrawPriorityQuestsButton();
ImGui.SameLine();
DrawJournalProgressButton();
ImGui.SameLine();
DrawReloadDataButton();
ImGui.SameLine();
DrawRebuildNavmeshButton();
ImGui.SameLine();
DrawTroubleshootingButton(questController.CurrentQuest, questController.IsRunning);

if (pluginInterface.IsDev)
{
Expand All @@ -45,45 +37,52 @@ public void Draw()
}
}

private void DrawPriorityQuestsButton()
internal void DrawPriorityQuestsButton(bool showLabel = false)
{
if (QstWidgets.RailButton(FontAwesomeIcon.ExclamationCircle,
_L("Priority Quests"),
_L("Configure priority quests which will be done as soon as possible."),
enabled: objectTable[0] != null))
enabled: objectTable[0] != null,
showLabel: showLabel))
priorityWindow.ToggleOrUncollapse();
}

private void DrawRebuildNavmeshButton()
internal void DrawRebuildNavmeshButton(bool showLabel = false)
{
bool isNavmeshAvailable = commandManager.Commands.ContainsKey("/vnav");
string tooltip = isNavmeshAvailable
? _L("Hold CTRL to enable this button. Rebuilding the navmesh will take some time.")
: _L("vnavmesh is not available. Please install it first.");
if (QstWidgets.RailButton(FontAwesomeIcon.GlobeEurope, _L("Rebuild Navmesh"), tooltip,
enabled: isNavmeshAvailable && ImGui.IsKeyDown(ImGuiKey.ModCtrl)))
enabled: isNavmeshAvailable && ImGui.IsKeyDown(ImGuiKey.ModCtrl),
showLabel: showLabel))
commandManager.ProcessCommand("/vnav rebuild");
}

private void DrawReloadDataButton()
internal void DrawReloadDataButton(bool showLabel = false)
{
if (QstWidgets.RailButton(FontAwesomeIcon.RedoAlt, _L("Reload Data")))
if (QstWidgets.RailButton(FontAwesomeIcon.RedoAlt, _L("Reload Data"),
showLabel: showLabel))
Reload?.Invoke(this, EventArgs.Empty);
}

private void DrawJournalProgressButton()
internal void DrawJournalProgressButton(bool showLabel = false)
{
if (QstWidgets.RailButton(FontAwesomeIcon.BookBookmark, _L("Journal Progress")))
if (QstWidgets.RailButton(FontAwesomeIcon.BookBookmark, _L("Journal Progress"),
showLabel: showLabel))
journalProgressWindow.ToggleOrUncollapse();
}

private void DrawTroubleshootingButton(QuestController.QuestProgress? questProgress, bool isRunning)
internal void DrawTroubleshootingButton(bool showLabel = false, bool highlighted = false)
{
QuestController.QuestProgress? questProgress = questController.CurrentQuest;
bool isRunning = highlighted || questController.IsRunning;
bool leftClicked = QstWidgets.RailButton(FontAwesomeIcon.Handshake,
_L("Stuck?"),
_L("Left click: Copy troubleshooting information to clipboard\nRight click: Copy list of completed quests to clipboard"),
tint: isRunning ? QstTheme.Accent : null,
enabled: objectTable[0] != null);
enabled: objectTable[0] != null,
showLabel: showLabel);
bool rightClicked = ImGui.IsItemClicked(ImGuiMouseButton.Right);
if (leftClicked || rightClicked)
{
Expand Down Expand Up @@ -154,7 +153,7 @@ private void DrawTroubleshootingButton(QuestController.QuestProgress? questProgr
}
}

private void DrawValidationIssuesButton()
internal void DrawValidationIssuesButton(bool showLabel = false)
{
int errorCount = questRegistry.ValidationErrorCount;
int infoCount = questRegistry.ValidationIssueCount - questRegistry.ValidationErrorCount;
Expand All @@ -163,7 +162,8 @@ private void DrawValidationIssuesButton()
if (QstWidgets.RailButton(hasErrors ? FontAwesomeIcon.ExclamationTriangle : FontAwesomeIcon.InfoCircle,
_L("Quest Validation"),
_LF("Quest validation: {0} errors, {1} infos", errorCount, infoCount),
tint: hasErrors ? QstTheme.Danger : QstTheme.Info))
tint: hasErrors ? QstTheme.Danger : QstTheme.Info,
showLabel: showLabel))
questValidationWindow.ToggleOrUncollapse();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ public void Draw()
IList<string> gatheringTasks = gatheringController.GetRemainingTaskNames();
bool isGathering = gatheringTasks.Count > 0;
IList<string> tasks = isGathering ? gatheringTasks : questController.GetRemainingTaskNames();
if (tasks.Count == 0)
return;

if (!QstWidgets.SectionHeader(_L("Remaining Tasks"), "RemainingTasks", count: tasks.Count))
return;
Expand Down
1 change: 0 additions & 1 deletion Questionable/Windows/QuestWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ public QuestWindow(IDalamudPluginInterface pluginInterface,
}
});

_activeQuestComponent.Reload += OnReload;
_quickAccessButtonsComponent.Reload += OnReload;
_questController.IsQuestWindowOpenFunction = () => IsOpen;
}
Expand Down
Loading