summaryrefslogtreecommitdiff
path: root/editor/plugins/material_editor_plugin.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-03-26 17:23:11 +0100
committerGitHub <noreply@github.com>2020-03-26 17:23:11 +0100
commit5f1107aa30295e686be6f41cb6d17fc2cff1e036 (patch)
tree7bce4c680e6686c9d29be8b479be5b39205ce7a3 /editor/plugins/material_editor_plugin.cpp
parenta2da99f40cf2123c0906c734a2eb01e9b65a45a2 (diff)
parentbe07f86f85ab70a48b310b42faa64e72a74ca694 (diff)
Merge pull request #37317 from akien-mga/display-server-rebased
Separate DisplayServer from OS and add multiple windows support
Diffstat (limited to 'editor/plugins/material_editor_plugin.cpp')
-rw-r--r--editor/plugins/material_editor_plugin.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/editor/plugins/material_editor_plugin.cpp b/editor/plugins/material_editor_plugin.cpp
index d388296927..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<Texture2D> checkerboard = get_icon("Checkerboard", "EditorIcons");
+ Ref<Texture2D> checkerboard = get_theme_icon("Checkerboard", "EditorIcons");
Size2 size = get_size();
draw_texture_rect(checkerboard, Rect2(Point2(), size), true);
@@ -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;
world.instance();
viewport->set_world(world); //use own world