mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Allow editor commands to have multiple default commands
This commit is contained in:
@@ -357,3 +357,13 @@ Ref<Shortcut> ED_SHORTCUT_AND_COMMAND(const String &p_path, const String &p_name
|
||||
EditorCommandPalette::get_singleton()->add_shortcut_command(p_command_name, p_path, shortcut);
|
||||
return shortcut;
|
||||
}
|
||||
|
||||
Ref<Shortcut> ED_SHORTCUT_ARRAY_AND_COMMAND(const String &p_path, const String &p_name, const PackedInt32Array &p_keycodes, String p_command_name) {
|
||||
if (p_command_name.is_empty()) {
|
||||
p_command_name = p_name;
|
||||
}
|
||||
|
||||
Ref<Shortcut> shortcut = ED_SHORTCUT_ARRAY(p_path, p_name, p_keycodes);
|
||||
EditorCommandPalette::get_singleton()->add_shortcut_command(p_command_name, p_path, shortcut);
|
||||
return shortcut;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user