mirror of
https://github.com/godotengine/godot.git
synced 2024-11-22 04:06:14 +00:00
Merge pull request #44051 from EricEzaM/PR/rename-files-with-F2-key
Added F2 shortcuts for renaming files & folders.
This commit is contained in:
commit
a5fa9199ef
@ -2511,7 +2511,11 @@ void FileSystemDock::_tree_gui_input(Ref<InputEvent> p_event) {
|
||||
_tree_rmb_option(FILE_REMOVE);
|
||||
} else if (ED_IS_SHORTCUT("filesystem_dock/rename", p_event)) {
|
||||
_tree_rmb_option(FILE_RENAME);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
accept_event();
|
||||
}
|
||||
}
|
||||
|
||||
@ -2526,7 +2530,11 @@ void FileSystemDock::_file_list_gui_input(Ref<InputEvent> p_event) {
|
||||
_file_list_rmb_option(FILE_REMOVE);
|
||||
} else if (ED_IS_SHORTCUT("filesystem_dock/rename", p_event)) {
|
||||
_file_list_rmb_option(FILE_RENAME);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
accept_event();
|
||||
}
|
||||
}
|
||||
|
||||
@ -2683,7 +2691,7 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) {
|
||||
ED_SHORTCUT("filesystem_dock/copy_path", TTR("Copy Path"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_C);
|
||||
ED_SHORTCUT("filesystem_dock/duplicate", TTR("Duplicate..."), KEY_MASK_CMD | KEY_D);
|
||||
ED_SHORTCUT("filesystem_dock/delete", TTR("Delete"), KEY_DELETE);
|
||||
ED_SHORTCUT("filesystem_dock/rename", TTR("Rename"));
|
||||
ED_SHORTCUT("filesystem_dock/rename", TTR("Rename"), KEY_F2);
|
||||
|
||||
VBoxContainer *top_vbc = memnew(VBoxContainer);
|
||||
add_child(top_vbc);
|
||||
|
Loading…
Reference in New Issue
Block a user