diff options
Diffstat (limited to 'editor/action_map_editor.cpp')
-rw-r--r-- | editor/action_map_editor.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/editor/action_map_editor.cpp b/editor/action_map_editor.cpp index 712b11d7d7..ae54c20fe2 100644 --- a/editor/action_map_editor.cpp +++ b/editor/action_map_editor.cpp @@ -354,10 +354,6 @@ void ActionMapEditor::_notification(int p_what) { } void ActionMapEditor::_bind_methods() { - ClassDB::bind_method(D_METHOD("_get_drag_data_fw"), &ActionMapEditor::get_drag_data_fw); - ClassDB::bind_method(D_METHOD("_can_drop_data_fw"), &ActionMapEditor::can_drop_data_fw); - ClassDB::bind_method(D_METHOD("_drop_data_fw"), &ActionMapEditor::drop_data_fw); - ADD_SIGNAL(MethodInfo("action_added", PropertyInfo(Variant::STRING, "name"))); ADD_SIGNAL(MethodInfo("action_edited", PropertyInfo(Variant::STRING, "name"), PropertyInfo(Variant::DICTIONARY, "new_action"))); ADD_SIGNAL(MethodInfo("action_removed", PropertyInfo(Variant::STRING, "name"))); @@ -453,10 +449,14 @@ void ActionMapEditor::update_action_list(const Vector<ActionInfo> &p_action_info // First Column - Icon Ref<InputEventKey> k = event; if (k.is_valid()) { - if (k->get_physical_keycode() == Key::NONE) { + if (k->get_physical_keycode() == Key::NONE && k->get_keycode() == Key::NONE && k->get_key_label() != Key::NONE) { + event_item->set_icon(0, action_tree->get_theme_icon(SNAME("KeyboardLabel"), SNAME("EditorIcons"))); + } else if (k->get_keycode() != Key::NONE) { event_item->set_icon(0, action_tree->get_theme_icon(SNAME("Keyboard"), SNAME("EditorIcons"))); - } else { + } else if (k->get_physical_keycode() != Key::NONE) { event_item->set_icon(0, action_tree->get_theme_icon(SNAME("KeyboardPhysical"), SNAME("EditorIcons"))); + } else { + event_item->set_icon(0, action_tree->get_theme_icon(SNAME("KeyboardError"), SNAME("EditorIcons"))); } } @@ -578,7 +578,7 @@ ActionMapEditor::ActionMapEditor() { action_tree->connect("button_clicked", callable_mp(this, &ActionMapEditor::_tree_button_pressed)); main_vbox->add_child(action_tree); - action_tree->set_drag_forwarding_compat(this); + SET_DRAG_FORWARDING_GCD(action_tree, ActionMapEditor); // Adding event dialog event_config_dialog = memnew(InputEventConfigurationDialog); |