Remove the UI::EventReturn return values. Makes editing the UI nicer.

This commit is contained in:
Henrik Rydgård committed 2025-09-15 11:09:00 -06:00
1 parent 730fd4754e
commit 58456ae950
62 files changed
+516 -935

No files matched your search

+2 -9
View File
@@ -1253,7 +1253,6 @@ void EmuScreen::CreateViews() {
Memory::MemFault_IgnoreLastCrash();
coreState = CoreState::CORE_RUNNING_CPU;
}
return UI::EVENT_DONE;
});
resumeButton_->SetVisibility(V_GONE);
@@ -1262,21 +1261,18 @@ void EmuScreen::CreateViews() {
if (coreState == CoreState::CORE_RUNTIME_ERROR) {
System_PostUIMessage(UIMessage::REQUEST_GAME_RESET);
}
return UI::EVENT_DONE;
});
resetButton_->SetVisibility(V_GONE);
backButton_ = buttons->Add(new Button(di->T("Back")));
backButton_->OnClick.Add([this](UI::EventParams &) {
this->pauseTrigger_ = true;
return UI::EVENT_DONE;
});
backButton_->SetVisibility(V_GONE);
cardboardDisableButton_ = root_->Add(new Button(sc->T("Cardboard VR OFF"), new AnchorLayoutParams(bounds.centerX(), NONE, NONE, 30, true)));
cardboardDisableButton_->OnClick.Add([](UI::EventParams &) {
g_Config.bEnableCardboardVR = false;
return UI::EVENT_DONE;
});
cardboardDisableButton_->SetVisibility(V_GONE);
cardboardDisableButton_->SetScale(0.65f); // make it smaller - this button can be in the way otherwise.
@@ -1338,7 +1334,6 @@ void EmuScreen::CreateViews() {
loadingBG->SetVisibility(V_GONE);
loadingSpinner->SetVisibility(V_GONE);
}
return EVENT_DONE;
});
// Will become visible along with the loadingView.
loadingBG->SetVisibility(V_INVISIBLE);
@@ -1362,15 +1357,14 @@ void EmuScreen::deviceRestored(Draw::DrawContext *draw) {
}
}
UI::EventReturn EmuScreen::OnDevTools(UI::EventParams &params) {
void EmuScreen::OnDevTools(UI::EventParams &params) {
DevMenuScreen *devMenu = new DevMenuScreen(gamePath_, I18NCat::DEVELOPER);
if (params.v)
devMenu->SetPopupOrigin(params.v);
screenManager()->push(devMenu);
return UI::EVENT_DONE;
}
UI::EventReturn EmuScreen::OnChat(UI::EventParams &params) {
void EmuScreen::OnChat(UI::EventParams &params) {
if (chatButton_ != nullptr && chatButton_->GetVisibility() == UI::V_VISIBLE) {
chatButton_->SetVisibility(UI::V_GONE);
}
@@ -1388,7 +1382,6 @@ UI::EventReturn EmuScreen::OnChat(UI::EventParams &params) {
}
#endif
}
return UI::EVENT_DONE;
}
// To avoid including proAdhoc.h, which includes a lot of stuff.