mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-14 10:09:32 +01:00
Add ability to set keyboard focus to specific screens. Needed for searchbar on Mac.
This commit is contained in:
1 parent
a1f83ca5c4
commit
ea4c46f27c
9 files changed
+36
-6
No files matched your search
+16
-2
@@ -15,8 +15,22 @@
|
||||
void Screen::focusChanged(ScreenFocusChange focusChange) {
|
||||
const char *eventName = "";
|
||||
switch (focusChange) {
|
||||
case ScreenFocusChange::FOCUS_LOST_TOP: eventName = "FOCUS_LOST_TOP"; break;
|
||||
case ScreenFocusChange::FOCUS_BECAME_TOP: eventName = "FOCUS_BECAME_TOP"; break;
|
||||
case ScreenFocusChange::FOCUS_LOST_TOP:
|
||||
#if !defined(MOBILE_DEVICE)
|
||||
if (WantsTextInput()) {
|
||||
System_NotifyUIEvent(UIEventNotification::TEXT_LOSTFOCUS);
|
||||
}
|
||||
#endif
|
||||
eventName = "FOCUS_LOST_TOP";
|
||||
break;
|
||||
case ScreenFocusChange::FOCUS_BECAME_TOP:
|
||||
#if !defined(MOBILE_DEVICE)
|
||||
if (WantsTextInput()) {
|
||||
System_NotifyUIEvent(UIEventNotification::TEXT_GOTFOCUS);
|
||||
}
|
||||
#endif
|
||||
eventName = "FOCUS_BECAME_TOP";
|
||||
break;
|
||||
}
|
||||
DEBUG_LOG(Log::UI, "Screen %s got %s", this->tag(), eventName);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user