Use a UI event for clearing recents.
This way it builds on Android, and is cross platform too.
This commit is contained in:
parent
26c5ee4a6d
commit
f97794136c
6 changed files with 13 additions and 19 deletions
|
@ -554,9 +554,6 @@ void MainScreen::sendMessage(const char *message, const char *value) {
|
|||
if (!strcmp(message, "language")) {
|
||||
RecreateViews();
|
||||
}
|
||||
if (!strcmp(message, "clearrecentlist")){
|
||||
RecreateViews();
|
||||
}
|
||||
}
|
||||
|
||||
void MainScreen::update(InputState &input) {
|
||||
|
@ -594,6 +591,7 @@ UI::EventReturn MainScreen::OnGameSettings(UI::EventParams &e) {
|
|||
// screenManager()->push(new SettingsScreen());
|
||||
auto gameSettings = new GameSettingsScreen("", "");
|
||||
gameSettings->OnLanguageChanged.Handle(this, &MainScreen::OnLanguageChange);
|
||||
gameSettings->OnRecentChanged.Handle(this, &MainScreen::OnRecentChange);
|
||||
screenManager()->push(gameSettings);
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
@ -606,6 +604,14 @@ UI::EventReturn MainScreen::OnLanguageChange(UI::EventParams &e) {
|
|||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
||||
UI::EventReturn MainScreen::OnRecentChange(UI::EventParams &e) {
|
||||
RecreateViews();
|
||||
if (host) {
|
||||
host->UpdateUI();
|
||||
}
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
||||
UI::EventReturn MainScreen::OnCredits(UI::EventParams &e) {
|
||||
screenManager()->push(new CreditsScreen());
|
||||
return UI::EVENT_DONE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue