void MainScreen::become_front() { InterfaceScreen::become_front(); if (Preferences::preferences()->play_idle_music() && !SongIsPlaying()) { LoadSong(kTitleSongID); SetSongVolume(kMaxMusicVolume); PlaySong(); } }
void ScrollTextScreen::become_front() { // If a song was requested, play it. if (_play_song && Preferences::preferences()->play_idle_music()) { if (SongIsPlaying()) { StopAndUnloadSong(); } LoadSong(_song_id); SetSongVolume(kMaxMusicVolume); PlaySong(); } _start = now_usecs(); _next_shift = _start; _clip = Rect(0, 0, world.width(), kScrollTextHeight); _clip.center_in(world); _position = _build_pix.size().as_rect(); _position.center_in(_clip); _position.offset(0, _clip.bottom - _position.top); }
void ScrollTextScreen::resign_front() { // If a song was requested, stop it. if (_play_song && SongIsPlaying()) { StopAndUnloadSong(); } }