Fix menu keyboard and controller navigation.
This commit is contained in:
parent
71a9948157
commit
2111ff0e2a
4 changed files with 66 additions and 47 deletions
|
|
@ -2111,6 +2111,14 @@ bool Window::has_focus() const {
|
|||
return focused;
|
||||
}
|
||||
|
||||
bool Window::has_focus_or_active_popup() const {
|
||||
ERR_READ_THREAD_GUARD_V(false);
|
||||
if (window_id != DisplayServer::INVALID_WINDOW_ID) {
|
||||
return DisplayServer::get_singleton()->window_is_focused(window_id) || (DisplayServer::get_singleton()->window_get_active_popup() == window_id);
|
||||
}
|
||||
return focused;
|
||||
}
|
||||
|
||||
void Window::start_drag() {
|
||||
ERR_MAIN_THREAD_GUARD;
|
||||
if (window_id != DisplayServer::INVALID_WINDOW_ID) {
|
||||
|
|
|
|||
|
|
@ -419,6 +419,7 @@ public:
|
|||
|
||||
void grab_focus();
|
||||
bool has_focus() const;
|
||||
bool has_focus_or_active_popup() const;
|
||||
|
||||
void start_drag();
|
||||
void start_resize(DisplayServer::WindowResizeEdge p_edge);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue