diff --git a/addons/graphics_editor/Layer.gd b/addons/graphics_editor/Layer.gd index 57a9800..a74c716 100644 --- a/addons/graphics_editor/Layer.gd +++ b/addons/graphics_editor/Layer.gd @@ -15,7 +15,7 @@ func set_image_storage(image_data): texture.create_from_image(image_data) texture.set_flags(0) texture.setup_local_to_scene() - get_node("TextureRect").texture = texture + get_node("LayerPreview/TextureRect").texture = texture func set_layer_visible(value): layer_visible = value diff --git a/addons/graphics_editor/Layer.tscn b/addons/graphics_editor/Layer.tscn index 023b5bc..298c599 100644 --- a/addons/graphics_editor/Layer.tscn +++ b/addons/graphics_editor/Layer.tscn @@ -1,7 +1,6 @@ -[gd_scene load_steps=4 format=2] +[gd_scene load_steps=3 format=2] [ext_resource path="res://addons/graphics_editor/Layer.gd" type="Script" id=1] -[ext_resource path="res://icon.png" type="Texture" id=2] [sub_resource type="StyleBoxFlat" id=1] bg_color = Color( 1, 1, 1, 1 ) @@ -50,12 +49,18 @@ focus_mode = 0 enabled_focus_mode = 0 text = "X" -[node name="TextureRect" type="TextureRect" parent="."] +[node name="LayerPreview" type="ColorRect" parent="."] margin_left = 10.0 margin_top = 20.0 margin_right = 74.0 margin_bottom = 84.0 -texture = ExtResource( 2 ) +mouse_filter = 2 +color = Color( 0.329412, 0.329412, 0.329412, 1 ) + +[node name="TextureRect" type="TextureRect" parent="LayerPreview"] +anchor_right = 1.0 +anchor_bottom = 1.0 +mouse_filter = 2 expand = true stretch_mode = 1 [connection signal="pressed" from="LayerButton" to="." method="_on_LayerButton_pressed"]