mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-05 02:35:29 +02:00
Retain focus after popup choice selection.
This commit is contained in:
1 parent
1e3beadb7b
commit
57f44edaea
2 files changed
+7
No files matched your search
@@ -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_;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user