| 113 | } |
| 114 | |
| 115 | void TitleScreen::update(float dt) { |
| 116 | m_cursor.update(dt); |
| 117 | |
| 118 | for (auto p : m_rightAnchoredButtons) |
| 119 | p.first->setPosition(Vec2I(m_guiContext->windowWidth() / m_guiContext->interfaceScale(), 0) + p.second); |
| 120 | m_mainMenu->determineSizeFromChildren(); |
| 121 | m_backgroundMenu->determineSizeFromChildren(); |
| 122 | |
| 123 | m_skyBackdrop->update(dt); |
| 124 | m_environmentPainter->update(dt); |
| 125 | |
| 126 | m_backgroundMenu->update(dt); |
| 127 | m_paneManager.update(dt); |
| 128 | |
| 129 | m_scriptComponent->update(dt); |
| 130 | if (!finishedState()) { |
| 131 | if (auto audioSample = m_musicTrackManager.updateAmbient(m_musicTrack, m_skyBackdrop->isDayTime())) { |
| 132 | m_currentMusicTrack = audioSample; |
| 133 | audioSample->setMixerGroup(MixerGroup::Music); |
| 134 | audioSample->setLoops(0); |
| 135 | m_mixer->play(audioSample); |
| 136 | } |
| 137 | } |
| 138 | } |
| 139 | |
| 140 | bool TitleScreen::textInputActive() const { |
| 141 | return m_paneManager.keyboardCapturedForTextInput(); |
nothing calls this directly
no test coverage detected