MCPcopy Create free account
hub / github.com/XorTroll/uLaunch / LoadMenu

Method LoadMenu

projects/uMenu/source/ul/menu/ui/ui_MenuApplication.cpp:244–293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

242 }
243
244 void MenuApplication::LoadMenu(const MenuType type, const bool fade, MenuFadeCallback fade_cb) {
245 this->StopPlayBgm();
246
247 if(fade) {
248 this->SetBackgroundFade();
249 this->FadeOut();
250
251 if(fade_cb) {
252 fade_cb();
253 }
254 }
255
256 this->EnsureLayoutCreated(type);
257
258 switch(type) {
259 case MenuType::Startup: {
260 this->startup_menu_lyt->ReloadMenu();
261 this->LoadLayout(this->startup_menu_lyt);
262 break;
263 }
264 case MenuType::Main: {
265 this->main_menu_lyt->Reload();
266 this->LoadLayout(this->main_menu_lyt);
267 break;
268 }
269 case MenuType::Settings: {
270 this->settings_menu_lyt->Rewind();
271 this->settings_menu_lyt->Reload(false);
272 this->LoadLayout(this->settings_menu_lyt);
273 break;
274 }
275 case MenuType::Themes: {
276 this->themes_menu_lyt->Reload();
277 this->LoadLayout(this->themes_menu_lyt);
278 break;
279 }
280 case MenuType::Lockscreen: {
281 this->LoadLayout(this->lockscreen_menu_lyt);
282 break;
283 }
284 }
285
286 this->loaded_menu = type;
287
288 this->StartPlayBgm();
289
290 if(fade) {
291 this->FadeIn();
292 }
293 }
294
295 void MenuApplication::ShowNotification(const std::string &text, const u64 timeout) {
296 this->EndOverlay();

Callers 11

OnLoadMethod · 0.95
UnlockScreenFunction · 0.80
ShowSettingsMenuFunction · 0.80
ShowThemesMenuFunction · 0.80
OnFinishedSleepFunction · 0.80
OnMenuInputMethod · 0.80
OnHomeButtonPressMethod · 0.80
OnMenuInputMethod · 0.80
OnHomeButtonPressMethod · 0.80
user_DefaultKeyMethod · 0.80

Calls 7

StopPlayBgmMethod · 0.95
SetBackgroundFadeMethod · 0.95
EnsureLayoutCreatedMethod · 0.95
StartPlayBgmMethod · 0.95
ReloadMenuMethod · 0.45
ReloadMethod · 0.45
RewindMethod · 0.45

Tested by

no test coverage detected