From 9e08742de81b062c30b7984900a55d5150a4bd17 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Tue, 3 Mar 2020 22:51:12 -0300 Subject: Added a Window node, and made it the scene root. Still a lot of work to do. --- editor/plugins/material_editor_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'editor/plugins/material_editor_plugin.cpp') diff --git a/editor/plugins/material_editor_plugin.cpp b/editor/plugins/material_editor_plugin.cpp index d388296927..a13a594d95 100644 --- a/editor/plugins/material_editor_plugin.cpp +++ b/editor/plugins/material_editor_plugin.cpp @@ -114,7 +114,7 @@ MaterialEditor::MaterialEditor() { vc->set_stretch(true); add_child(vc); vc->set_anchors_and_margins_preset(PRESET_WIDE); - viewport = memnew(Viewport); + viewport = memnew(SubViewport); Ref world; world.instance(); viewport->set_world(world); //use own world -- cgit v1.2.3 From 441f1a5fe9a3bf0e4e5dab578f793500b1ff6e3d Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Thu, 12 Mar 2020 09:37:40 -0300 Subject: Popups are now windows also (broken!) --- editor/plugins/material_editor_plugin.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'editor/plugins/material_editor_plugin.cpp') diff --git a/editor/plugins/material_editor_plugin.cpp b/editor/plugins/material_editor_plugin.cpp index a13a594d95..74588d4439 100644 --- a/editor/plugins/material_editor_plugin.cpp +++ b/editor/plugins/material_editor_plugin.cpp @@ -44,15 +44,15 @@ void MaterialEditor::_notification(int p_what) { if (first_enter) { //it's in propertyeditor so.. could be moved around - light_1_switch->set_normal_texture(get_icon("MaterialPreviewLight1", "EditorIcons")); - light_1_switch->set_pressed_texture(get_icon("MaterialPreviewLight1Off", "EditorIcons")); - light_2_switch->set_normal_texture(get_icon("MaterialPreviewLight2", "EditorIcons")); - light_2_switch->set_pressed_texture(get_icon("MaterialPreviewLight2Off", "EditorIcons")); + light_1_switch->set_normal_texture(get_theme_icon("MaterialPreviewLight1", "EditorIcons")); + light_1_switch->set_pressed_texture(get_theme_icon("MaterialPreviewLight1Off", "EditorIcons")); + light_2_switch->set_normal_texture(get_theme_icon("MaterialPreviewLight2", "EditorIcons")); + light_2_switch->set_pressed_texture(get_theme_icon("MaterialPreviewLight2Off", "EditorIcons")); - sphere_switch->set_normal_texture(get_icon("MaterialPreviewSphereOff", "EditorIcons")); - sphere_switch->set_pressed_texture(get_icon("MaterialPreviewSphere", "EditorIcons")); - box_switch->set_normal_texture(get_icon("MaterialPreviewCubeOff", "EditorIcons")); - box_switch->set_pressed_texture(get_icon("MaterialPreviewCube", "EditorIcons")); + sphere_switch->set_normal_texture(get_theme_icon("MaterialPreviewSphereOff", "EditorIcons")); + sphere_switch->set_pressed_texture(get_theme_icon("MaterialPreviewSphere", "EditorIcons")); + box_switch->set_normal_texture(get_theme_icon("MaterialPreviewCubeOff", "EditorIcons")); + box_switch->set_pressed_texture(get_theme_icon("MaterialPreviewCube", "EditorIcons")); first_enter = false; } @@ -60,7 +60,7 @@ void MaterialEditor::_notification(int p_what) { if (p_what == NOTIFICATION_DRAW) { - Ref checkerboard = get_icon("Checkerboard", "EditorIcons"); + Ref checkerboard = get_theme_icon("Checkerboard", "EditorIcons"); Size2 size = get_size(); draw_texture_rect(checkerboard, Rect2(Point2(), size), true); -- cgit v1.2.3