when one change the current scene, menu controllable system update current button to use

This commit is contained in:
arthur.jamet
2021-06-08 11:39:58 +02:00
parent ff74b8c2d3
commit 036ecb960e
8 changed files with 103 additions and 38 deletions

View File

@@ -40,7 +40,9 @@ namespace BBM
this->_now = lastTick;
move = controllable.move;
select = controllable.bomb;
select = controllable.jump;
if (currentButton && currentButton->_scene.getID() != wal.scene->getID())
currentButton = nullptr;
if (currentButton == nullptr && buttons.size())
currentButton = &(**buttons.begin());
this->updateCurrentButton();