Ensure all checks of is_action in the editor which are for 'shortcut' use, check the action exactly.

This commit is contained in:
Eric M
2022-09-24 18:01:02 +10:00
parent f74491fdee
commit 2eda77c682
10 changed files with 46 additions and 46 deletions

View File

@@ -183,35 +183,35 @@ void ScrollBar::gui_input(const Ref<InputEvent> &p_event) {
}
if (p_event->is_pressed()) {
if (p_event->is_action("ui_left")) {
if (p_event->is_action("ui_left", true)) {
if (orientation != HORIZONTAL) {
return;
}
set_value(get_value() - (custom_step >= 0 ? custom_step : get_step()));
} else if (p_event->is_action("ui_right")) {
} else if (p_event->is_action("ui_right", true)) {
if (orientation != HORIZONTAL) {
return;
}
set_value(get_value() + (custom_step >= 0 ? custom_step : get_step()));
} else if (p_event->is_action("ui_up")) {
} else if (p_event->is_action("ui_up", true)) {
if (orientation != VERTICAL) {
return;
}
set_value(get_value() - (custom_step >= 0 ? custom_step : get_step()));
} else if (p_event->is_action("ui_down")) {
} else if (p_event->is_action("ui_down", true)) {
if (orientation != VERTICAL) {
return;
}
set_value(get_value() + (custom_step >= 0 ? custom_step : get_step()));
} else if (p_event->is_action("ui_home")) {
} else if (p_event->is_action("ui_home", true)) {
set_value(get_min());
} else if (p_event->is_action("ui_end")) {
} else if (p_event->is_action("ui_end", true)) {
set_value(get_max());
}
}