Use Key enum instead of plain integers

This commit is contained in:
Aaron Franke 2021-06-20 13:12:33 -04:00
parent 18bd0fee5a
commit fa3a32a2d6
No known key found for this signature in database
GPG key ID: 40A1750B977E56BF
43 changed files with 173 additions and 102 deletions

View file

@ -153,6 +153,8 @@ void EditorCommandPalette::_sbox_input(const Ref<InputEvent> &p_ie) {
case KEY_PAGEDOWN: {
search_options->call("_gui_input", k);
} break;
default:
break;
}
}
}
@ -289,7 +291,7 @@ EditorCommandPalette::EditorCommandPalette() {
set_hide_on_ok(false);
}
Ref<Shortcut> ED_SHORTCUT_AND_COMMAND(const String &p_path, const String &p_name, uint32_t p_keycode, String p_command_name) {
Ref<Shortcut> ED_SHORTCUT_AND_COMMAND(const String &p_path, const String &p_name, Key p_keycode, String p_command_name) {
if (p_command_name.is_empty()) {
p_command_name = p_name;
}