MCPcopy Create free account
hub / github.com/EasyRPG/Player / PushTitleScene

Method PushTitleScene

src/scene.cpp:370–387  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

368}
369
370void Scene::PushTitleScene(bool pop_stack_top) {
371 auto title_scene = Scene::Find(Scene::Title);
372 if (title_scene) {
373 return;
374 }
375
376 if (!Player::startup_language.empty()) {
377 Player::translation.SelectLanguage(Player::startup_language);
378 } else if (Player::translation.HasTranslations()) {
379 if (Player::player_config.lang_select_on_start.Get() == ConfigEnum::StartupLangSelect::Always
380 || (!FileFinder::HasSavegame() && Player::player_config.lang_select_on_start.Get() == ConfigEnum::StartupLangSelect::FirstStartup)) {
381 Scene::Push(std::make_shared<Scene_Language>(), pop_stack_top);
382 return;
383 }
384 }
385
386 Scene::Push(std::make_shared<Scene_Title>(), pop_stack_top);
387}
388
389bool Scene::ReturnToTitleScene() {
390 if (Scene::instance && Scene::instance->type == Scene::Title) {

Callers

nothing calls this directly

Calls 4

SelectLanguageMethod · 0.80
HasTranslationsMethod · 0.80
emptyMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected