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