2020-09-26 15:55:24 +01:00
|
|
|
#include "cheats_page.hpp"
|
2020-10-05 23:53:12 +01:00
|
|
|
|
|
|
|
namespace i18n = brls::i18n;
|
|
|
|
using namespace i18n::literals;
|
2020-09-26 15:55:24 +01:00
|
|
|
CheatsPage::CheatsPage() : AppletFrame(true, true)
|
|
|
|
{
|
2020-10-05 23:53:12 +01:00
|
|
|
this->setTitle("menus/cheat_menu"_i18n );
|
2020-09-26 15:55:24 +01:00
|
|
|
list = new brls::List();
|
|
|
|
|
2020-10-05 23:53:12 +01:00
|
|
|
view = new brls::ListItem("menus/cheat_view"_i18n );
|
2020-09-26 15:55:24 +01:00
|
|
|
view->getClickEvent()->subscribe([&](brls::View* view){
|
|
|
|
brls::Application::pushView(new AppPage());
|
|
|
|
});
|
|
|
|
list->addView(view);
|
|
|
|
|
2020-10-05 23:53:12 +01:00
|
|
|
exclude = new brls::ListItem("menus/cheat_exclude"_i18n );
|
2020-09-26 15:55:24 +01:00
|
|
|
exclude->getClickEvent()->subscribe([&](brls::View* view){
|
|
|
|
brls::Application::pushView(new ExcludePage());
|
|
|
|
});
|
|
|
|
list->addView(exclude);
|
|
|
|
|
2020-10-05 01:59:46 +01:00
|
|
|
|
2020-10-05 23:53:12 +01:00
|
|
|
deleteCheats = new brls::ListItem("menus/cheat_delete_all_ex"_i18n );
|
2020-09-26 15:55:24 +01:00
|
|
|
deleteCheats->getClickEvent()->subscribe([&](brls::View* view){
|
|
|
|
stagedFrame = new brls::StagedAppletFrame();
|
2020-10-05 23:53:12 +01:00
|
|
|
stagedFrame->setTitle("menus/cheat_delete_all_cheat"_i18n );
|
2020-09-26 15:55:24 +01:00
|
|
|
stagedFrame->addStage(
|
2020-10-05 23:53:12 +01:00
|
|
|
new WorkerPage(stagedFrame, "menus/cheat_Deleting"_i18n , [](){removeCheats(getCFW());})
|
2020-09-26 15:55:24 +01:00
|
|
|
);
|
|
|
|
stagedFrame->addStage(
|
2020-10-05 23:53:12 +01:00
|
|
|
new ConfirmPage(stagedFrame, "menus/cheat_All_done"_i18n , true)
|
2020-09-26 15:55:24 +01:00
|
|
|
);
|
|
|
|
brls::Application::pushView(stagedFrame);
|
|
|
|
});
|
|
|
|
list->addView(deleteCheats);
|
|
|
|
|
|
|
|
this->setContentView(list);
|
|
|
|
}
|