diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-07-21 00:58:49 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-07-21 00:58:49 +1000 |
commit | 4b0bc220e4da1173f742a4973939b139bef562db (patch) | |
tree | 0ff66d5957575fa814fc10b8cd93e3dd378f45dc /source/frontend/StarRadioMessagePopup.cpp | |
parent | 607be749451aa40e3619e7ceab0927d1fcec8233 (diff) |
Support for changing the game's timescale
Context-specific (like per-world) timescales can also be added later
Diffstat (limited to 'source/frontend/StarRadioMessagePopup.cpp')
-rw-r--r-- | source/frontend/StarRadioMessagePopup.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/frontend/StarRadioMessagePopup.cpp b/source/frontend/StarRadioMessagePopup.cpp index f7c9061..503f2d1 100644 --- a/source/frontend/StarRadioMessagePopup.cpp +++ b/source/frontend/StarRadioMessagePopup.cpp @@ -44,9 +44,9 @@ RadioMessagePopup::RadioMessagePopup() { enterStage(PopupStage::Hidden); } -void RadioMessagePopup::update() { +void RadioMessagePopup::update(float dt) { if (messageActive()) { - if (m_stageTimer.tick()) + if (m_stageTimer.tick(dt)) nextPopupStage(); if (m_popupStage == PopupStage::AnimateIn) { @@ -65,11 +65,11 @@ void RadioMessagePopup::update() { setBG("", strf("{}:{}", m_animateOutImage, frame), ""); } - m_slideTimer = min(m_slideTimer + WorldTimestep, m_slideTime); + m_slideTimer = min(m_slideTimer + dt, m_slideTime); updateAnchorOffset(); } - Pane::update(); + Pane::update(dt); } void RadioMessagePopup::dismissed() { |