2.
You can use "button->setEnabled(false)" to disable the button which makes the button unclickable, but that might also change the look of the button depending on the theme, which might be undesirable.
One other thing you could do is temporarily disable the signal callback with "button->onPress.setEnabled(false)".
3.
Does each state have its own Gui object, or is there only a single Gui object that is shared between all states? (it is recommended to only have a single Gui per window)
Every Gui object contains a std::chrono::steady_clock which starts counting on the first call to draw(). Any calls you make to draw() afterwards will check the elapsed time since the last draw call and update animations with this amount of time.
So it sounds like when you go back to the previous stack, the elapsed time passed to the widgets is the entire time you spend within the last state, and hence the animations finish immediately. But that would only be the case if there was a Gui per state.
There might be multiple solutions to this (e.g. manually control the time of TGUI instead of letting the Gui handle it), but I would first need to better understand how things happen exactly before I can make suggestions on how to fix this.
You can use "button->setEnabled(false)" to disable the button which makes the button unclickable, but that might also change the look of the button depending on the theme, which might be undesirable.
One other thing you could do is temporarily disable the signal callback with "button->onPress.setEnabled(false)".
3.
Does each state have its own Gui object, or is there only a single Gui object that is shared between all states? (it is recommended to only have a single Gui per window)
Every Gui object contains a std::chrono::steady_clock which starts counting on the first call to draw(). Any calls you make to draw() afterwards will check the elapsed time since the last draw call and update animations with this amount of time.
So it sounds like when you go back to the previous stack, the elapsed time passed to the widgets is the entire time you spend within the last state, and hence the animations finish immediately. But that would only be the case if there was a Gui per state.
There might be multiple solutions to this (e.g. manually control the time of TGUI instead of letting the Gui handle it), but I would first need to better understand how things happen exactly before I can make suggestions on how to fix this.