diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/animation_track_editor.cpp | 5 | ||||
-rw-r--r-- | editor/editor_node.cpp | 5 | ||||
-rw-r--r-- | editor/editor_themes.cpp | 19 | ||||
-rw-r--r-- | editor/filesystem_dock.cpp | 4 | ||||
-rw-r--r-- | editor/plugins/animation_state_machine_editor.cpp | 6 | ||||
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/spatial_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/scene_tree_dock.cpp | 3 |
8 files changed, 22 insertions, 24 deletions
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index 3da8f29697..766df27e62 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -2853,7 +2853,10 @@ void AnimationTrackEdit::_gui_input(const Ref<InputEvent> &p_event) { Vector2 theme_ofs = path->get_theme_stylebox("normal", "LineEdit")->get_offset(); path->set_position(get_global_position() + path_rect.position - theme_ofs); path->set_size(path_rect.size); - path->show_modal(); +#ifndef _MSC_VER +#warning show modal not supported any longer, need to move this to a popup +#endif + path->show(); path->grab_focus(); path->set_cursor_position(path->get_text().length()); clicking_on_name = false; diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 291f3dc319..2cc6bad2a9 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -264,11 +264,8 @@ void EditorNode::_update_title() { void EditorNode::_unhandled_input(const Ref<InputEvent> &p_event) { - if (Node::get_viewport()->get_modal_stack_top()) - return; //ignore because of modal window - Ref<InputEventKey> k = p_event; - if (k.is_valid() && k->is_pressed() && !k->is_echo() && !gui_base->get_viewport()->gui_has_modal_stack()) { + if (k.is_valid() && k->is_pressed() && !k->is_echo()) { EditorPlugin *old_editor = editor_plugin_screen; diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index c7f353f6fb..4eedf61a5f 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -911,15 +911,16 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { style_window->set_border_width(MARGIN_TOP, 24 * EDSCALE); style_window->set_expand_margin_size(MARGIN_TOP, 24 * EDSCALE); - theme->set_stylebox("panel", "AcceptDialog", style_default); - theme->set_stylebox("panel_window", "AcceptDialog", style_window); - theme->set_color("title_color", "AcceptDialog", font_color); - theme->set_icon("close", "AcceptDialog", theme->get_icon("GuiClose", "EditorIcons")); - theme->set_icon("close_highlight", "AcceptDialog", theme->get_icon("GuiClose", "EditorIcons")); - theme->set_constant("close_h_ofs", "AcceptDialog", 22 * EDSCALE); - theme->set_constant("close_v_ofs", "AcceptDialog", 20 * EDSCALE); - theme->set_constant("title_height", "AcceptDialog", 24 * EDSCALE); - theme->set_font("title_font", "AcceptDialog", theme->get_font("title", "EditorFonts")); + theme->set_stylebox("panel", "Window", style_default); + theme->set_stylebox("panel_window", "Window", style_window); + theme->set_color("title_color", "Window", font_color); + theme->set_icon("close", "Window", theme->get_icon("GuiClose", "EditorIcons")); + theme->set_icon("close_highlight", "Window", theme->get_icon("GuiClose", "EditorIcons")); + theme->set_constant("close_h_ofs", "Window", 22 * EDSCALE); + theme->set_constant("close_v_ofs", "Window", 20 * EDSCALE); + theme->set_constant("title_height", "Window", 24 * EDSCALE); + theme->set_constant("resize_margin", "Window", 4 * EDSCALE); + theme->set_font("title_font", "Window", theme->get_font("title", "EditorFonts")); // complex window, for now only Editor settings and Project settings Ref<StyleBoxFlat> style_complex_window = style_window->duplicate(); diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index e951259cc7..e1fcddda3a 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -2350,8 +2350,6 @@ void FileSystemDock::_file_multi_selected(int p_index, bool p_selected) { } void FileSystemDock::_tree_gui_input(Ref<InputEvent> p_event) { - if (get_viewport()->get_modal_stack_top()) - return; // Ignore because of modal window. Ref<InputEventKey> key = p_event; if (key.is_valid() && key->is_pressed() && !key->is_echo()) { @@ -2368,8 +2366,6 @@ void FileSystemDock::_tree_gui_input(Ref<InputEvent> p_event) { } void FileSystemDock::_file_list_gui_input(Ref<InputEvent> p_event) { - if (get_viewport()->get_modal_stack_top()) - return; // Ignore because of modal window. Ref<InputEventKey> key = p_event; if (key.is_valid() && key->is_pressed() && !key->is_echo()) { diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp index ea7a97982c..c5979bf952 100644 --- a/editor/plugins/animation_state_machine_editor.cpp +++ b/editor/plugins/animation_state_machine_editor.cpp @@ -158,7 +158,11 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv name_edit->set_global_position(state_machine_draw->get_global_transform().xform(edit_rect.position)); name_edit->set_size(edit_rect.size); name_edit->set_text(node_rects[i].node_name); - name_edit->show_modal(); +#ifndef _MSC_VER +#warning no more show modal, so it must replaced by a popup +#endif + //name_edit->show_modal(); + name_edit->show(); name_edit->grab_focus(); name_edit->select_all(); diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 1ad0df5224..4cc0bd4780 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -477,7 +477,7 @@ void CanvasItemEditor::_unhandled_key_input(const Ref<InputEvent> &p_ev) { Ref<InputEventKey> k = p_ev; - if (!is_visible_in_tree() || get_viewport()->gui_has_modal_stack()) + if (!is_visible_in_tree()) return; if (k->get_keycode() == KEY_CONTROL || k->get_keycode() == KEY_ALT || k->get_keycode() == KEY_SHIFT) { diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index 286125d31b..f0730f0144 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -5718,7 +5718,7 @@ void SpatialEditor::snap_selected_nodes_to_floor() { void SpatialEditor::_unhandled_key_input(Ref<InputEvent> p_event) { - if (!is_visible_in_tree() || get_viewport()->gui_has_modal_stack()) + if (!is_visible_in_tree()) return; snap_key_enabled = InputFilter::get_singleton()->is_key_pressed(KEY_CONTROL); diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index f0b9b32c34..613ba53fed 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -75,9 +75,6 @@ void SceneTreeDock::_input(Ref<InputEvent> p_event) { void SceneTreeDock::_unhandled_key_input(Ref<InputEvent> p_event) { - if (get_viewport()->get_modal_stack_top()) - return; //ignore because of modal window - if (get_focus_owner() && get_focus_owner()->is_text_field()) return; |