mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-18 11:54:30 +01:00
Keep track of focus position
This commit is contained in:
1 parent
f9f893f3fc
commit
ecab31ef8b
4 files changed
+33
-15
No files matched your search
@@ -24,7 +24,6 @@ static std::mutex eventMutex_;
|
||||
static std::function<void(UISound)> soundCallback;
|
||||
static bool soundEnabled = true;
|
||||
|
||||
|
||||
struct DispatchQueueItem {
|
||||
Event *e;
|
||||
EventParams params;
|
||||
|
||||
@@ -191,6 +191,13 @@ void ScreenManager::render() {
|
||||
processFinishDialog();
|
||||
}
|
||||
|
||||
void ScreenManager::getFocusPosition(float &x, float &y, float &z) {
|
||||
UI::View *v = UI::GetFocusedView();
|
||||
x = v ? v->GetBounds().x : 0;
|
||||
y = v ? v->GetBounds().y : 0;
|
||||
z = stack_.size();
|
||||
}
|
||||
|
||||
void ScreenManager::sendMessage(const char *msg, const char *value) {
|
||||
if (!strcmp(msg, "recreateviews"))
|
||||
RecreateAllViews();
|
||||
|
||||
@@ -141,6 +141,8 @@ public:
|
||||
|
||||
Screen *topScreen() const;
|
||||
|
||||
void getFocusPosition(float &x, float &y, float &z);
|
||||
|
||||
std::recursive_mutex inputLock_;
|
||||
|
||||
private:
|
||||
|
||||
Reference in new issue
Block a user