mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Ensure all checks of is_action in the editor which are for 'shortcut' use, check the action exactly.
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user