summaryrefslogtreecommitdiffstats
path: root/editor/plugins/texture_3d_editor_plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins/texture_3d_editor_plugin.cpp')
-rw-r--r--editor/plugins/texture_3d_editor_plugin.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/editor/plugins/texture_3d_editor_plugin.cpp b/editor/plugins/texture_3d_editor_plugin.cpp
index 1b5c2dcab1..0cba4aa428 100644
--- a/editor/plugins/texture_3d_editor_plugin.cpp
+++ b/editor/plugins/texture_3d_editor_plugin.cpp
@@ -143,25 +143,23 @@ void Texture3DEditor::edit(Ref<Texture3D> p_texture) {
Texture3DEditor::Texture3DEditor() {
set_texture_repeat(TextureRepeat::TEXTURE_REPEAT_ENABLED);
set_custom_minimum_size(Size2(1, 150));
+
texture_rect = memnew(Control);
- texture_rect->connect("draw", callable_mp(this, &Texture3DEditor::_texture_rect_draw));
texture_rect->set_mouse_filter(MOUSE_FILTER_IGNORE);
add_child(texture_rect);
+ texture_rect->connect("draw", callable_mp(this, &Texture3DEditor::_texture_rect_draw));
layer = memnew(SpinBox);
layer->set_step(1);
layer->set_max(100);
+ layer->set_h_grow_direction(GROW_DIRECTION_BEGIN);
+ layer->set_modulate(Color(1, 1, 1, 0.8));
add_child(layer);
layer->set_anchor(SIDE_RIGHT, 1);
layer->set_anchor(SIDE_LEFT, 1);
- layer->set_h_grow_direction(GROW_DIRECTION_BEGIN);
- layer->set_modulate(Color(1, 1, 1, 0.8));
+ layer->connect("value_changed", callable_mp(this, &Texture3DEditor::_layer_changed));
+
info = memnew(Label);
- add_child(info);
- info->set_anchor(SIDE_RIGHT, 1);
- info->set_anchor(SIDE_LEFT, 1);
- info->set_anchor(SIDE_BOTTOM, 1);
- info->set_anchor(SIDE_TOP, 1);
info->set_h_grow_direction(GROW_DIRECTION_BEGIN);
info->set_v_grow_direction(GROW_DIRECTION_BEGIN);
info->add_theme_color_override("font_color", Color(1, 1, 1, 1));
@@ -169,9 +167,11 @@ Texture3DEditor::Texture3DEditor() {
info->add_theme_constant_override("shadow_outline_size", 1);
info->add_theme_constant_override("shadow_offset_x", 2);
info->add_theme_constant_override("shadow_offset_y", 2);
-
- setting = false;
- layer->connect("value_changed", callable_mp(this, &Texture3DEditor::_layer_changed));
+ add_child(info);
+ info->set_anchor(SIDE_RIGHT, 1);
+ info->set_anchor(SIDE_LEFT, 1);
+ info->set_anchor(SIDE_BOTTOM, 1);
+ info->set_anchor(SIDE_TOP, 1);
}
Texture3DEditor::~Texture3DEditor() {