mirror of
https://github.com/libretro/ppsspp.git
synced 2025-02-25 03:10:31 +00:00
Retain focus after popup choice selection.
This commit is contained in:
parent
1e3beadb7b
commit
57f44edaea
@ -255,6 +255,8 @@ UI::EventReturn ListPopupScreen::OnListChoice(UI::EventParams &e) {
|
||||
namespace UI {
|
||||
|
||||
UI::EventReturn PopupMultiChoice::HandleClick(UI::EventParams &e) {
|
||||
restoreFocus_ = HasFocus();
|
||||
|
||||
std::vector<std::string> choices;
|
||||
for (int i = 0; i < numChoices_; i++) {
|
||||
choices.push_back(category_ ? category_->T(choices_[i]) : choices_[i]);
|
||||
@ -288,6 +290,10 @@ void PopupMultiChoice::ChoiceCallback(int num) {
|
||||
e.v = this;
|
||||
e.a = num;
|
||||
OnChoice.Trigger(e);
|
||||
|
||||
if (restoreFocus_) {
|
||||
SetFocusedView(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -218,6 +218,7 @@ private:
|
||||
I18NCategory *category_;
|
||||
ScreenManager *screenManager_;
|
||||
std::string valueText_;
|
||||
bool restoreFocus_;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user