mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 17:43:52 +00:00
fix(ui): close trainer window immediately on close request
This commit is contained in:
parent
f235b8641f
commit
422ff99b2a
1 changed files with 7 additions and 0 deletions
|
|
@ -13602,6 +13602,13 @@ void GameScreen::renderTrainerWindow(game::GameHandler& gameHandler) {
|
||||||
|
|
||||||
bool open = true;
|
bool open = true;
|
||||||
if (ImGui::Begin("Trainer", &open)) {
|
if (ImGui::Begin("Trainer", &open)) {
|
||||||
|
// If user clicked window close, short-circuit before rendering large trainer tables.
|
||||||
|
if (!open) {
|
||||||
|
ImGui::End();
|
||||||
|
gameHandler.closeTrainer();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const auto& trainer = gameHandler.getTrainerSpells();
|
const auto& trainer = gameHandler.getTrainerSpells();
|
||||||
|
|
||||||
// NPC name
|
// NPC name
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue