mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-24 08:00:14 +00:00
Tick summon request timeout down in UI render loop; auto-expire on timeout
This commit is contained in:
parent
770ac645d5
commit
b381f1e13f
2 changed files with 13 additions and 0 deletions
|
|
@ -4407,6 +4407,11 @@ void GameScreen::renderDuelRequestPopup(game::GameHandler& gameHandler) {
|
|||
void GameScreen::renderSummonRequestPopup(game::GameHandler& gameHandler) {
|
||||
if (!gameHandler.hasPendingSummonRequest()) return;
|
||||
|
||||
// Tick the timeout down
|
||||
float dt = ImGui::GetIO().DeltaTime;
|
||||
gameHandler.tickSummonTimeout(dt);
|
||||
if (!gameHandler.hasPendingSummonRequest()) return; // expired
|
||||
|
||||
auto* window = core::Application::getInstance().getWindow();
|
||||
float screenW = window ? static_cast<float>(window->getWidth()) : 1280.0f;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue