| 642 | } |
| 643 | |
| 644 | MainMenuLayout::MainMenuLayout() : IMenuLayout(), last_quick_menu_on(false), start_time_elapsed(false), is_incrementing_decrementing(false), next_reload_user_changed(false) { |
| 645 | UL_LOG_INFO("Creating MainMenuLayout..."); |
| 646 | const auto time = std::chrono::system_clock::now(); |
| 647 | // TODO (low priority): like nxlink but for sending themes and quickly being able to test them? |
| 648 | this->cur_folder_path = g_GlobalSettings.system_status.last_menu_path; |
| 649 | |
| 650 | this->quick_menu = nullptr; |
| 651 | |
| 652 | this->post_suspend_sfx = nullptr; |
| 653 | this->cursor_move_sfx = nullptr; |
| 654 | this->page_move_sfx = nullptr; |
| 655 | this->entry_select_sfx = nullptr; |
| 656 | this->entry_move_sfx = nullptr; |
| 657 | this->entry_swap_sfx = nullptr; |
| 658 | this->entry_cancel_select_sfx = nullptr; |
| 659 | this->entry_move_into_sfx = nullptr; |
| 660 | this->home_press_sfx = nullptr; |
| 661 | this->logoff_sfx = nullptr; |
| 662 | this->launch_app_sfx = nullptr; |
| 663 | this->launch_hb_sfx = nullptr; |
| 664 | this->close_suspended_sfx = nullptr; |
| 665 | this->open_folder_sfx = nullptr; |
| 666 | this->close_folder_sfx = nullptr; |
| 667 | this->open_mii_edit_sfx = nullptr; |
| 668 | this->open_web_browser_sfx = nullptr; |
| 669 | this->open_user_page_sfx = nullptr; |
| 670 | this->open_settings_sfx = nullptr; |
| 671 | this->open_themes_sfx = nullptr; |
| 672 | this->open_controllers_sfx = nullptr; |
| 673 | this->open_album_sfx = nullptr; |
| 674 | this->open_amiibo_sfx = nullptr; |
| 675 | this->open_quick_menu_sfx = nullptr; |
| 676 | this->close_quick_menu_sfx = nullptr; |
| 677 | this->resume_app_sfx = nullptr; |
| 678 | this->create_folder_sfx = nullptr; |
| 679 | this->create_hb_entry_sfx = nullptr; |
| 680 | this->entry_remove_sfx = nullptr; |
| 681 | this->error_sfx = nullptr; |
| 682 | this->menu_increment_sfx = nullptr; |
| 683 | this->menu_decrement_sfx = nullptr; |
| 684 | |
| 685 | // Load banners first |
| 686 | this->top_menu_default_bg = pu::ui::elm::Image::New(0, 0, TryFindLoadImageHandle("ui/Main/TopMenuBackground/Default")); |
| 687 | this->top_menu_folder_bg = pu::ui::elm::Image::New(0, 0, TryFindLoadImageHandle("ui/Main/TopMenuBackground/Folder")); |
| 688 | this->top_menu_app_bg = pu::ui::elm::Image::New(0, 0, TryFindLoadImageHandle("ui/Main/TopMenuBackground/Application")); |
| 689 | this->top_menu_hb_bg = pu::ui::elm::Image::New(0, 0, TryFindLoadImageHandle("ui/Main/TopMenuBackground/Homebrew")); |
| 690 | g_GlobalSettings.ApplyConfigForElement("main_menu", "top_menu_bg", this->top_menu_default_bg); |
| 691 | g_GlobalSettings.ApplyConfigForElement("main_menu", "top_menu_bg", this->top_menu_folder_bg); |
| 692 | g_GlobalSettings.ApplyConfigForElement("main_menu", "top_menu_bg", this->top_menu_app_bg); |
| 693 | g_GlobalSettings.ApplyConfigForElement("main_menu", "top_menu_bg", this->top_menu_hb_bg); |
| 694 | this->Add(this->top_menu_default_bg); |
| 695 | this->Add(this->top_menu_folder_bg); |
| 696 | this->Add(this->top_menu_app_bg); |
| 697 | this->Add(this->top_menu_hb_bg); |
| 698 | |
| 699 | // Then load buttons and other UI elements |
| 700 | this->logo_top_icon = ClickableImage::New(0, 0, GetLogoTexture()); |
| 701 | this->logo_top_icon->SetWidth(LogoSize); |
nothing calls this directly
no test coverage detected