diff --git a/example/slides/slide_0.tscn b/example/slides/slide_0.tscn new file mode 100644 index 0000000..f403630 --- /dev/null +++ b/example/slides/slide_0.tscn @@ -0,0 +1,29 @@ +[gd_scene load_steps=2 format=3 uid="uid://xmd7juxvox48"] + +[ext_resource type="PackedScene" uid="uid://bso65vpjqc4g4" path="res://addons/SUI/scenesrc/SuiText.tscn" id="1_6xtdi"] + +[node name="Slide 0" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="Text" parent="." instance=ExtResource("1_6xtdi")] +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -340.0 +offset_top = -112.0 +offset_right = 340.0 +offset_bottom = 112.0 +text = "[b]Slide 0[/b] + + + + +[right]Hello World![/right]" diff --git a/example/slides/slide_1.tscn b/example/slides/slide_1.tscn new file mode 100644 index 0000000..0116c05 --- /dev/null +++ b/example/slides/slide_1.tscn @@ -0,0 +1,29 @@ +[gd_scene load_steps=2 format=3 uid="uid://kahpiyo87bjc"] + +[ext_resource type="PackedScene" uid="uid://bso65vpjqc4g4" path="res://addons/SUI/scenesrc/SuiText.tscn" id="1_6wxt0"] + +[node name="Slide 1" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="Text" parent="." instance=ExtResource("1_6wxt0")] +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -340.0 +offset_top = -112.0 +offset_right = 340.0 +offset_bottom = 112.0 +text = "[b]Slide 1[/b] + + + + +[right]Hello Presencode![/right]" diff --git a/example/src/entrypoint.gd b/example/src/entrypoint.gd index f2c8647..97d24dc 100644 --- a/example/src/entrypoint.gd +++ b/example/src/entrypoint.gd @@ -19,4 +19,4 @@ func switch_to_slide(new_slide: int) -> void: api.remove_all_slides() # Add new slide - sms.add_scene("slide", "slide_" + str(new_slide), CoreTypes.SceneType.MAIN) + sms.add_scene("slide", resources["slide_" + str(new_slide)], CoreTypes.SceneType.MAIN)