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

Method ChangeLanguage

src/scene_language.cpp:169–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167}
168
169void Scene_Language::ChangeLanguage(const std::string& lang_str) {
170 Main_Data::game_system->SePlay(Main_Data::game_system->GetSystemSE(Main_Data::game_system->SFX_Decision));
171
172 // No-op?
173 if (lang_str == Player::translation.GetCurrentLanguage().lang_dir) {
174 PopOrTitle();
175 return;
176 }
177
178 // First change the language
179 Player::translation.SelectLanguage(lang_str);
180 Main_Data::game_system->ReloadSystemGraphic();
181
182 // Delay scene shutdown by one frame to allow async requests for language change
183 // and system graphic reload to finish before the scene switches
184 shutdown = true;
185}
186
187void Scene_Language::PopOrTitle() {
188 if (!Find(Title)) {

Callers

nothing calls this directly

Calls 3

SePlayMethod · 0.80
SelectLanguageMethod · 0.80
ReloadSystemGraphicMethod · 0.80

Tested by

no test coverage detected