1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-15 13:51:40 +00:00

Modify color in ColorPicker with keyboard or joypad

This commit is contained in:
Konrad Gadzina
2024-11-07 13:27:11 +01:00
parent 4f0cbc9a58
commit e6f812c056
8 changed files with 539 additions and 8 deletions

View File

@@ -402,6 +402,7 @@ static const _BuiltinActionDisplayName _builtin_action_display_names[] = {
{ "ui_filedialog_show_hidden", TTRC("Show Hidden") },
{ "ui_swap_input_direction ", TTRC("Swap Input Direction") },
{ "ui_unicode_start", TTRC("Start Unicode Character Input") },
{ "ui_colorpicker_delete_preset", TTRC("Toggle License Notices") },
{ "", ""}
/* clang-format on */
};
@@ -789,6 +790,12 @@ const HashMap<String, List<Ref<InputEvent>>> &InputMap::get_builtins() {
inputs.push_back(InputEventKey::create_reference(Key::QUOTELEFT | KeyModifierMask::CMD_OR_CTRL));
default_builtin_cache.insert("ui_swap_input_direction", inputs);
// ///// UI ColorPicker Shortcuts /////
inputs = List<Ref<InputEvent>>();
inputs.push_back(InputEventJoypadButton::create_reference(JoyButton::X));
inputs.push_back(InputEventKey::create_reference(Key::KEY_DELETE));
default_builtin_cache.insert("ui_colorpicker_delete_preset", inputs);
return default_builtin_cache;
}