diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2022-04-12 23:46:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-12 23:46:56 +0200 |
commit | 895f2a21f4beea6f4c89d33666bdf3b0925d6db7 (patch) | |
tree | 0a146241304a1a2620802745b1f08b6e2c7a7a02 /editor/action_map_editor.cpp | |
parent | 360fff4ccfd7fb0fa364a21ed1401c81502b5712 (diff) | |
parent | 0b0a74e135846b15485eea6e92975e2182edccdc (diff) | |
download | redot-engine-895f2a21f4beea6f4c89d33666bdf3b0925d6db7.tar.gz |
Merge pull request #60081 from fire-forge/input-event-editor-fix
Redesign InputEvent editor and fix `Window.popup_centered()` rect calculation.
Diffstat (limited to 'editor/action_map_editor.cpp')
-rw-r--r-- | editor/action_map_editor.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/editor/action_map_editor.cpp b/editor/action_map_editor.cpp index 86b40a311e..49c79d709b 100644 --- a/editor/action_map_editor.cpp +++ b/editor/action_map_editor.cpp @@ -589,8 +589,6 @@ void InputEventConfigurationDialog::_notification(int p_what) { icon_cache.joypad_button = get_theme_icon(SNAME("JoyButton"), SNAME("EditorIcons")); icon_cache.joypad_axis = get_theme_icon(SNAME("JoyAxis"), SNAME("EditorIcons")); - mouse_detection_rect->set_color(get_theme_color(SNAME("dark_color_2"), SNAME("Editor"))); - _update_input_list(); } break; } @@ -624,7 +622,7 @@ void InputEventConfigurationDialog::popup_and_configure(const Ref<InputEvent> &p device_id_option->select(0); } - popup_centered(); + popup_centered(Size2(0, 400) * EDSCALE); } Ref<InputEvent> InputEventConfigurationDialog::get_event() const { @@ -656,8 +654,8 @@ InputEventConfigurationDialog::InputEventConfigurationDialog() { event_as_text = memnew(Label); event_as_text->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER); vb->add_child(event_as_text); - // Mouse button detection rect (Mouse button event outside this ColorRect will be ignored) - mouse_detection_rect = memnew(ColorRect); + // Mouse button detection rect (Mouse button event outside this rect will be ignored) + mouse_detection_rect = memnew(Panel); mouse_detection_rect->set_v_size_flags(Control::SIZE_EXPAND_FILL); vb->add_child(mouse_detection_rect); tab_container->add_child(vb); @@ -1171,7 +1169,7 @@ void ActionMapEditor::update_action_list(const Vector<ActionInfo> &p_action_info void ActionMapEditor::show_message(const String &p_message) { message->set_text(p_message); - message->popup_centered(Size2(300, 100) * EDSCALE); + message->popup_centered(); } void ActionMapEditor::use_external_search_box(LineEdit *p_searchbox) { |