summaryrefslogtreecommitdiff
path: root/scene/main
diff options
context:
space:
mode:
authorGilles Roudière <gilles.roudiere@gmail.com>2019-03-09 21:09:20 +0100
committerGilles Roudière <gilles.roudiere@gmail.com>2019-03-09 21:09:20 +0100
commitede5306d7c51c55b7c613dec6885636b840bf519 (patch)
tree4301fc9d91d9c0850789fa7f62dac96bb87baf7c /scene/main
parentd41cd57595c4f68838b8dcf27e66cb77476577ed (diff)
Fixes UI navigation with joysticks
Diffstat (limited to 'scene/main')
-rw-r--r--scene/main/viewport.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 4f1330ee36..6735fce1ff 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -2290,32 +2290,32 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
if (from && p_event->is_pressed()) {
Control *next = NULL;
- if (p_event->is_action("ui_focus_next")) {
+ if (p_event->is_action_pressed("ui_focus_next")) {
next = from->find_next_valid_focus();
}
- if (p_event->is_action("ui_focus_prev")) {
+ if (p_event->is_action_pressed("ui_focus_prev")) {
next = from->find_prev_valid_focus();
}
- if (!mods && p_event->is_action("ui_up")) {
+ if (!mods && p_event->is_action_pressed("ui_up")) {
next = from->_get_focus_neighbour(MARGIN_TOP);
}
- if (!mods && p_event->is_action("ui_left")) {
+ if (!mods && p_event->is_action_pressed("ui_left")) {
next = from->_get_focus_neighbour(MARGIN_LEFT);
}
- if (!mods && p_event->is_action("ui_right")) {
+ if (!mods && p_event->is_action_pressed("ui_right")) {
next = from->_get_focus_neighbour(MARGIN_RIGHT);
}
- if (!mods && p_event->is_action("ui_down")) {
+ if (!mods && p_event->is_action_pressed("ui_down")) {
next = from->_get_focus_neighbour(MARGIN_BOTTOM);
}