MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / update

Method update

source/frontend/StarTitleScreen.cpp:115–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115void 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
140bool TitleScreen::textInputActive() const {
141 return m_paneManager.keyboardCapturedForTextInput();

Callers

nothing calls this directly

Calls 9

updateAmbientMethod · 0.80
isDayTimeMethod · 0.80
setMixerGroupMethod · 0.80
setLoopsMethod · 0.80
setPositionMethod · 0.45
windowWidthMethod · 0.45
interfaceScaleMethod · 0.45
playMethod · 0.45

Tested by

no test coverage detected