StickerClone/core/Background.tscn

48 lines
1.2 KiB
Text
Raw Normal View History

2024-07-28 20:24:01 +00:00
[gd_scene load_steps=3 format=3 uid="uid://bxin06eifwhb5"]
2024-07-28 15:58:13 +00:00
[ext_resource type="Texture2D" uid="uid://dx8jpmxtm2cdx" path="res://textures/pattern/Pattern_Forest.png" id="1_wdsuj"]
2024-07-28 20:24:01 +00:00
[sub_resource type="GDScript" id="GDScript_7jd0b"]
script/source = "@tool
extends CanvasLayer
@export var Pattern :Texture2D:
set(new_pattern):
Pattern = new_pattern
$TextureRect.texture = Pattern
$TextureRect.queue_redraw()
@export var PatternColor :Color = Color.WHITE:
set(new_patternColor):
PatternColor = new_patternColor
$TextureRect.self_modulate = PatternColor
$TextureRect.queue_redraw()
@export var BGColor :Color = Color.GRAY:
set(new_BGColor):
BGColor = new_BGColor
$ColorRect.color = BGColor
$ColorRect.queue_redraw()
"
2024-07-28 15:58:13 +00:00
2024-07-28 20:24:01 +00:00
[node name="Background" type="CanvasLayer"]
layer = -100
script = SubResource("GDScript_7jd0b")
[node name="TextureRect" type="TextureRect" parent="."]
light_mask = 0
2024-07-28 15:58:13 +00:00
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
2024-07-28 20:24:01 +00:00
texture = ExtResource("1_wdsuj")
stretch_mode = 1
2024-07-28 15:58:13 +00:00
2024-07-28 20:24:01 +00:00
[node name="ColorRect" type="ColorRect" parent="."]
z_index = -1
2024-07-28 15:58:13 +00:00
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
2024-07-28 20:24:01 +00:00
color = Color(0, 0, 0, 1)