diff options
author | David Luevano Alvarado <david@luevano.xyz> | 2022-05-31 21:11:46 -0600 |
---|---|---|
committer | David Luevano Alvarado <david@luevano.xyz> | 2022-05-31 21:11:46 -0600 |
commit | 227095a4f710ac6afd43f0a7e8b296f188cf20be (patch) | |
tree | e2f7e6a323ca4cad92b6a6012ed01a1afaf517fa /src/Main.tscn | |
parent | bd197168c39551c3456099ed2a39375a8442483f (diff) |
add working gif maker
Diffstat (limited to 'src/Main.tscn')
-rw-r--r-- | src/Main.tscn | 45 |
1 files changed, 44 insertions, 1 deletions
diff --git a/src/Main.tscn b/src/Main.tscn index 3a3eb6b..c0f7499 100644 --- a/src/Main.tscn +++ b/src/Main.tscn @@ -1,11 +1,54 @@ -[gd_scene load_steps=2 format=2] +[gd_scene load_steps=6 format=2] [ext_resource path="res://entities/actors/snake/scenes/Snake.tscn" type="PackedScene" id=1] +[ext_resource path="res://addons/GifMaker/GifRecorder.gd" type="Script" id=2] +[ext_resource path="res://addons/GifMaker/GifRectangle.gd" type="Script" id=3] +[ext_resource path="res://main.gd" type="Script" id=4] +[ext_resource path="res://screen_recorder.gd" type="Script" id=5] [node name="Main" type="Node2D"] +script = ExtResource( 4 ) [node name="Snake" parent="." instance=ExtResource( 1 )] [node name="Camera" type="Camera2D" parent="."] current = true zoom = Vector2( 0.5, 0.5 ) + +[node name="ScreenRecorder" type="CanvasLayer" parent="."] +script = ExtResource( 5 ) + +[node name="Control" type="Control" parent="ScreenRecorder"] +anchor_right = 1.0 +anchor_bottom = 1.0 + +[node name="GifRectangle" type="ReferenceRect" parent="ScreenRecorder/Control"] +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +margin_left = -64.0 +margin_top = -64.0 +margin_right = 64.0 +margin_bottom = 64.0 +script = ExtResource( 3 ) + +[node name="GifRecorder" type="Viewport" parent="ScreenRecorder/Control"] +size = Vector2( 128, 128 ) +script = ExtResource( 2 ) +render_type = 1 +seconds = 2.0 +autostart = true +capture_node_path = NodePath("../GifRectangle") + +[node name="Label" type="Label" parent="ScreenRecorder/Control"] +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +margin_left = -20.0 +margin_top = -15.5 +margin_right = 20.0 +margin_bottom = 15.5 +text = "TEST +" |