Merge pull request #66337 from EricEzaM/sprite-frames
Ensure control built-in shortcuts are matched exactly & add shortcuts for SpriteFrames editor
This commit is contained in:
@ -3191,7 +3191,7 @@ void Tree::gui_input(const Ref<InputEvent> &p_event) {
|
||||
Ref<InputEventKey> k = p_event;
|
||||
|
||||
bool is_command = k.is_valid() && k->is_command_or_control_pressed();
|
||||
if (p_event->is_action("ui_right") && p_event->is_pressed()) {
|
||||
if (p_event->is_action("ui_right", true) && p_event->is_pressed()) {
|
||||
if (!cursor_can_exit_tree) {
|
||||
accept_event();
|
||||
}
|
||||
@ -3209,7 +3209,7 @@ void Tree::gui_input(const Ref<InputEvent> &p_event) {
|
||||
} else {
|
||||
_go_right();
|
||||
}
|
||||
} else if (p_event->is_action("ui_left") && p_event->is_pressed()) {
|
||||
} else if (p_event->is_action("ui_left", true) && p_event->is_pressed()) {
|
||||
if (!cursor_can_exit_tree) {
|
||||
accept_event();
|
||||
}
|
||||
@ -3229,21 +3229,21 @@ void Tree::gui_input(const Ref<InputEvent> &p_event) {
|
||||
_go_left();
|
||||
}
|
||||
|
||||
} else if (p_event->is_action("ui_up") && p_event->is_pressed() && !is_command) {
|
||||
} else if (p_event->is_action("ui_up", true) && p_event->is_pressed() && !is_command) {
|
||||
if (!cursor_can_exit_tree) {
|
||||
accept_event();
|
||||
}
|
||||
|
||||
_go_up();
|
||||
|
||||
} else if (p_event->is_action("ui_down") && p_event->is_pressed() && !is_command) {
|
||||
} else if (p_event->is_action("ui_down", true) && p_event->is_pressed() && !is_command) {
|
||||
if (!cursor_can_exit_tree) {
|
||||
accept_event();
|
||||
}
|
||||
|
||||
_go_down();
|
||||
|
||||
} else if (p_event->is_action("ui_page_down") && p_event->is_pressed()) {
|
||||
} else if (p_event->is_action("ui_page_down", true) && p_event->is_pressed()) {
|
||||
if (!cursor_can_exit_tree) {
|
||||
accept_event();
|
||||
}
|
||||
@ -3281,7 +3281,7 @@ void Tree::gui_input(const Ref<InputEvent> &p_event) {
|
||||
}
|
||||
|
||||
ensure_cursor_is_visible();
|
||||
} else if (p_event->is_action("ui_page_up") && p_event->is_pressed()) {
|
||||
} else if (p_event->is_action("ui_page_up", true) && p_event->is_pressed()) {
|
||||
if (!cursor_can_exit_tree) {
|
||||
accept_event();
|
||||
}
|
||||
@ -3318,7 +3318,7 @@ void Tree::gui_input(const Ref<InputEvent> &p_event) {
|
||||
prev->select(selected_col);
|
||||
}
|
||||
ensure_cursor_is_visible();
|
||||
} else if (p_event->is_action("ui_accept") && p_event->is_pressed()) {
|
||||
} else if (p_event->is_action("ui_accept", true) && p_event->is_pressed()) {
|
||||
if (selected_item) {
|
||||
//bring up editor if possible
|
||||
if (!edit_selected()) {
|
||||
@ -3327,7 +3327,7 @@ void Tree::gui_input(const Ref<InputEvent> &p_event) {
|
||||
}
|
||||
}
|
||||
accept_event();
|
||||
} else if (p_event->is_action("ui_select") && p_event->is_pressed()) {
|
||||
} else if (p_event->is_action("ui_select", true) && p_event->is_pressed()) {
|
||||
if (select_mode == SELECT_MULTI) {
|
||||
if (!selected_item) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user