summaryrefslogtreecommitdiff
path: root/tools/editor/plugins/spatial_editor_plugin.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-10-05 01:26:35 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-10-05 01:26:35 -0300
commitcf5778e51a883936ffc896231da8259e5ebabc0a (patch)
tree286f7eb7956a5c2c275276bbc9e3db5e3ff0730f /tools/editor/plugins/spatial_editor_plugin.cpp
parenta6e9dc615346f44b68b418483dd218d11ba4a674 (diff)
-Added ViewportContainer, this is the only way to make viewports show up in GUI now
-2D editing now seems to work -Added some functions and refactoring to Viewport
Diffstat (limited to 'tools/editor/plugins/spatial_editor_plugin.cpp')
-rw-r--r--tools/editor/plugins/spatial_editor_plugin.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/editor/plugins/spatial_editor_plugin.cpp b/tools/editor/plugins/spatial_editor_plugin.cpp
index afea6f93dd..55a4c6c934 100644
--- a/tools/editor/plugins/spatial_editor_plugin.cpp
+++ b/tools/editor/plugins/spatial_editor_plugin.cpp
@@ -2348,7 +2348,7 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed
message_time=0;
spatial_editor=p_spatial_editor;
- Control *c=memnew(Control);
+ ViewportContainer *c=memnew(ViewportContainer);
add_child(c);
c->set_area_as_parent_rect();
viewport = memnew( Viewport );
@@ -3973,7 +3973,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
- settings_light_base = memnew( Control );
+ settings_light_base = memnew( ViewportContainer );
settings_light_base->set_custom_minimum_size(Size2(128,128));
settings_light_base->connect("input_event",this,"_default_light_angle_input");
settings_vbc->add_margin_child(TTR("Default Light Normal:"),settings_light_base);