1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Allow to use arrow keys with TOOL_MOVE

(cherry picked from commit 18918b4efa)
This commit is contained in:
Tomasz Chabora
2020-02-10 21:39:05 +01:00
committed by Rémi Verschelde
parent 50727d7b22
commit f0c89048d8

View File

@@ -2077,7 +2077,7 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) {
}
// Move the canvas items with the arrow keys
if (k.is_valid() && k->is_pressed() && tool == TOOL_SELECT &&
if (k.is_valid() && k->is_pressed() && (tool == TOOL_SELECT || tool == TOOL_MOVE) &&
(k->get_scancode() == KEY_UP || k->get_scancode() == KEY_DOWN || k->get_scancode() == KEY_LEFT || k->get_scancode() == KEY_RIGHT)) {
if (!k->is_echo()) {
// Start moving the canvas items with the keyboard