mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 17:43:52 +00:00
Add 'Add to Action Bar' option to spellbook right-click context menu
This commit is contained in:
parent
928f00de41
commit
e13993de9b
1 changed files with 13 additions and 0 deletions
|
|
@ -687,6 +687,19 @@ void SpellbookScreen::render(game::GameHandler& gameHandler, pipeline::AssetMana
|
||||||
}
|
}
|
||||||
if (onCooldown) ImGui::EndDisabled();
|
if (onCooldown) ImGui::EndDisabled();
|
||||||
}
|
}
|
||||||
|
if (!isPassive) {
|
||||||
|
if (ImGui::MenuItem("Add to Action Bar")) {
|
||||||
|
const auto& bar = gameHandler.getActionBar();
|
||||||
|
int firstEmpty = -1;
|
||||||
|
for (int si = 0; si < game::GameHandler::SLOTS_PER_BAR; ++si) {
|
||||||
|
if (bar[si].isEmpty()) { firstEmpty = si; break; }
|
||||||
|
}
|
||||||
|
if (firstEmpty >= 0) {
|
||||||
|
gameHandler.setActionBarSlot(firstEmpty,
|
||||||
|
game::ActionBarSlot::SPELL, info->spellId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if (ImGui::MenuItem("Copy Spell Link")) {
|
if (ImGui::MenuItem("Copy Spell Link")) {
|
||||||
char linkBuf[256];
|
char linkBuf[256];
|
||||||
snprintf(linkBuf, sizeof(linkBuf),
|
snprintf(linkBuf, sizeof(linkBuf),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue