Skip to content

CompletionWindow: add 'hide unlocked skills' checkbox (account-wide) and rename 'learned' to 'learnt'#2227

Merged
3vcloud merged 2 commits into
devfrom
claude/issue-1408-20260609-1125
Jun 9, 2026
Merged

CompletionWindow: add 'hide unlocked skills' checkbox (account-wide) and rename 'learned' to 'learnt'#2227
3vcloud merged 2 commits into
devfrom
claude/issue-1408-20260609-1125

Conversation

@3vcloud

@3vcloud 3vcloud commented Jun 9, 2026

Copy link
Copy Markdown
Member

Adds a new "Hide unlocked skills" checkbox alongside "Hide learnt skills" in the skill completion tracker.

The new checkbox hides skills already unlocked account-wide via GW::SkillbarMgr::GetIsSkillUnlocked, which reflects whether any hero on the account can use the skill — distinct from the per-character "learnt" status tracked in completion.ini.

Fixes #1408

Generated with Claude Code

…rned' to 'learnt'

Adds a new 'Hide unlocked skills' checkbox alongside 'Hide learnt skills' in the
skill completion tracker. The new checkbox filters out skills already unlocked
account-wide (via GW::SkillbarMgr::GetIsSkillUnlocked), which is distinct from
per-character learnt status tracked in completion.ini. Applies to both Elite
Skills and PvE Skills sections.

Fixes #1408

Co-authored-by: Jon <3vcloud@users.noreply.github.com>
@github-actions github-actions Bot added the AI Pull requests created by LLMs such as Claude label Jun 9, 2026
@3vcloud

3vcloud commented Jun 9, 2026

Copy link
Copy Markdown
Member Author

@claude consider the position of the "check now" button and how it might need amending after this change

@claude

claude Bot commented Jun 9, 2026

Copy link
Copy Markdown

Claude finished @3vcloud's task in 1m 53s —— View job


Analysis: "Check Now" button position after checkbox addition

  • Gather context
  • Read CompletionWindow.cpp to analyze button/checkbox layout
  • Provide recommendation

The Problem

The skills_title lambda at line 2377 places its UI elements using a right-aligned checkbox_offset:

const float checkbox_offset = ImGui::GetContentRegionAvail().x - 200.f * ImGui::FontScale();

The layout before this PR:

[Title text]  [Help?]  ...  [Check Now]  [Hide learned skills ☐]
                             ^                ^
                             checkbox_offset - 100    checkbox_offset

The 200-scaled-pixel right margin was sized for one checkbox. After this PR, there are two:

ImGui::SameLine(checkbox_offset);
ImGui::Checkbox("Hide learnt skills", &hide_unlocked_skills);   // ~120px wide
ImGui::SameLine();
ImGui::Checkbox("Hide unlocked skills", &hide_account_unlocked_skills);  // ~140px wide

Total checkbox width is ~268px but the right margin reserved is only 200 * FontScale px, so "Hide unlocked skills" will overflow/clip the window at default scale, and the overflow gets worse at larger font sizes.

Additionally, the button is placed at checkbox_offset - 100.f — note this -100.f is not scaled by FontScale, so the button position drifts relative to the checkboxes at non-default font sizes. That pre-existed but compounds the issue now.


Suggested Fix

Inside the skills_title lambda, compute a local offset sized for both checkboxes instead of reusing the generic checkbox_offset:

auto skills_title = [&, checkbox_offset](const char* title) {
    ImGui::PushID(title);
    ImGui::Text(title);
    ImGui::ShowHelp("...");
    // Need ~280px for two checkboxes; 100px for the button to the left of them.
    const float skills_checkbox_offset = ImGui::GetContentRegionAvail().x - 280.f * ImGui::FontScale();
    ImGui::SameLine(skills_checkbox_offset - 100.f * ImGui::FontScale());
    if (ImGui::Button("Check Now")) {
        GW::GameThread::Enqueue(CheckAllSkills);
    }
    if (ImGui::IsItemHovered()) {
        ImGui::SetTooltip("Will cycle through your available secondary professions to detect all unlocked skills");
    }
    ImGui::SameLine(skills_checkbox_offset);
    ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, {0, 0});
    ImGui::Checkbox("Hide learnt skills", &hide_unlocked_skills);
    ImGui::SameLine();
    ImGui::Checkbox("Hide unlocked skills", &hide_account_unlocked_skills);
    ImGui::PopStyleVar();
    ImGui::PopID();
};

Key changes:

  • 280.f right margin (up from 200.f) gives enough room for both checkboxes side-by-side.
  • - 100.f * ImGui::FontScale() for the button offset — adds the missing FontScale() factor so the button-to-checkbox gap scales consistently with font size.

Want me to apply this fix?

@3vcloud

3vcloud commented Jun 9, 2026

Copy link
Copy Markdown
Member Author

@claude dont just waffle about it, do something about it

@claude

claude Bot commented Jun 9, 2026

Copy link
Copy Markdown

Claude finished @3vcloud's task in 56s —— View job


Fixed "Check Now" button layout

  • Read CompletionWindow.cpp to find the layout code
  • Apply the fix
  • Commit and push

Changes made in CompletionWindow.cpp (skills_title lambda):

  • The lambda no longer captures the outer checkbox_offset (which was sized for one checkbox at 200px). It now computes its own skills_checkbox_offset at 280px to fit both checkboxes.
  • The button offset now uses - 100.f * ImGui::FontScale() instead of the bare unscaled - 100.f, so button-to-checkbox spacing scales correctly with font size.
    |

Compute a local offset sized for both checkboxes (280px instead of 200px)
and scale the button-to-checkbox gap with FontScale so layout stays
consistent at non-default font sizes.

Co-authored-by: Jon <3vcloud@users.noreply.github.com>
@3vcloud 3vcloud merged commit dce0c25 into dev Jun 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Pull requests created by LLMs such as Claude

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant