diff options
Diffstat (limited to 'editor/action_map_editor.cpp')
| -rw-r--r-- | editor/action_map_editor.cpp | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/editor/action_map_editor.cpp b/editor/action_map_editor.cpp index aab9743c43..96931efd3b 100644 --- a/editor/action_map_editor.cpp +++ b/editor/action_map_editor.cpp @@ -611,7 +611,6 @@ InputEventConfigurationDialog::InputEventConfigurationDialog() { add_child(main_vbox); tab_container = memnew(TabContainer); - tab_container->set_tab_alignment(TabBar::ALIGNMENT_LEFT); tab_container->set_use_hidden_tabs_for_min_size(true); tab_container->set_v_size_flags(Control::SIZE_EXPAND_FILL); tab_container->connect("tab_selected", callable_mp(this, &InputEventConfigurationDialog::_tab_selected)); @@ -1101,6 +1100,31 @@ void ActionMapEditor::update_action_list(const Vector<ActionInfo> &p_action_info event_item->set_meta("__event", event); event_item->set_meta("__index", evnt_idx); + // First Column - Icon + Ref<InputEventKey> k = event; + if (k.is_valid()) { + if (k->get_physical_keycode() == Key::NONE) { + event_item->set_icon(0, action_tree->get_theme_icon(SNAME("Keyboard"), SNAME("EditorIcons"))); + } else { + event_item->set_icon(0, action_tree->get_theme_icon(SNAME("KeyboardPhysical"), SNAME("EditorIcons"))); + } + } + + Ref<InputEventMouseButton> mb = event; + if (mb.is_valid()) { + event_item->set_icon(0, action_tree->get_theme_icon(SNAME("Mouse"), SNAME("EditorIcons"))); + } + + Ref<InputEventJoypadButton> jb = event; + if (jb.is_valid()) { + event_item->set_icon(0, action_tree->get_theme_icon(SNAME("JoyButton"), SNAME("EditorIcons"))); + } + + Ref<InputEventJoypadMotion> jm = event; + if (jm.is_valid()) { + event_item->set_icon(0, action_tree->get_theme_icon(SNAME("JoyAxis"), SNAME("EditorIcons"))); + } + // Third Column - Buttons event_item->add_button(2, action_tree->get_theme_icon(SNAME("Edit"), SNAME("EditorIcons")), BUTTON_EDIT_EVENT, false, TTR("Edit Event")); event_item->add_button(2, action_tree->get_theme_icon(SNAME("Remove"), SNAME("EditorIcons")), BUTTON_REMOVE_EVENT, false, TTR("Remove Event")); |
