[gd_scene load_steps=42 format=3 uid="uid://kywrsqro3d5i"]

[ext_resource type="Script" path="res://scripts/loading/gate_loader.gd" id="1_uxhy6"]
[ext_resource type="Resource" uid="uid://b1xvdym0qh6td" path="res://resources/gate_events.res" id="2_q7cvi"]
[ext_resource type="Resource" uid="uid://cmb7xvbue74qa" path="res://resources/sandbox_executable.tres" id="4_shus3"]
[ext_resource type="Script" path="res://scripts/sandbox/render_result.gd" id="5_nlg2s"]
[ext_resource type="Resource" uid="uid://l1quiaghft2f" path="res://resources/command_events.res" id="6_18mgg"]
[ext_resource type="Script" path="res://scripts/sandbox/sandbox_manager.gd" id="6_368sj"]
[ext_resource type="Script" path="res://scripts/sandbox/input_sync.gd" id="8_1blsi"]
[ext_resource type="Resource" uid="uid://bo6qgr210aamc" path="res://resources/sandbox_env.tres" id="8_a6dvr"]
[ext_resource type="Script" path="res://scripts/sandbox/sandbox_logger.gd" id="9_fikc8"]
[ext_resource type="Resource" uid="uid://crjhix0osmtnf" path="res://resources/ui_events.res" id="9_ir58h"]
[ext_resource type="Shader" path="res://shaders/render_result.gdshader" id="10_2auwe"]
[ext_resource type="Script" path="res://scripts/sandbox/command_sync.gd" id="10_cqo55"]
[ext_resource type="Resource" uid="uid://cjcdum6fm4ta0" path="res://resources/api_settings.tres" id="10_vhc7k"]
[ext_resource type="Script" path="res://scripts/sandbox/process_checker.gd" id="11_72cjp"]
[ext_resource type="Script" path="res://scripts/ui/world/world_ui.gd" id="12_jdwjt"]
[ext_resource type="Script" path="res://scripts/ui/world/foreground.gd" id="17_6e5v3"]
[ext_resource type="PackedScene" uid="uid://c7571vjq7l0jp" path="res://scenes/components/not_responding.tscn" id="17_kwbm3"]
[ext_resource type="Script" path="res://scripts/ui/world/gate_info.gd" id="18_q06xu"]
[ext_resource type="Shader" uid="uid://dd1axtdlit6no" path="res://shaders/vignette_blur.tres" id="18_sat0u"]
[ext_resource type="Script" path="res://scripts/ui/ui_mode_animation.gd" id="18_sx3kr"]
[ext_resource type="Script" path="res://scripts/ui/world/vignette_blur.gd" id="19_415fa"]
[ext_resource type="FontFile" uid="uid://do40418waa8w3" path="res://assets/fonts/Inter-Regular.otf" id="19_tkqw6"]
[ext_resource type="FontFile" uid="uid://bjeupg0ikc2kv" path="res://assets/fonts/Monospace.ttf" id="20_hoet7"]
[ext_resource type="LabelSettings" uid="uid://crt4elt055uhg" path="res://assets/styles/text_big.tres" id="20_v1648"]
[ext_resource type="FontFile" uid="uid://b3xb1fpllhnf4" path="res://assets/fonts/Inter-Italic.otf" id="21_lpegk"]
[ext_resource type="FontFile" uid="uid://tfj3o1e1wytn" path="res://assets/fonts/Inter-BoldItalic.otf" id="22_i5khx"]
[ext_resource type="FontFile" uid="uid://c14w1y1r54wgi" path="res://assets/fonts/Inter-Bold.otf" id="23_t1gqo"]
[ext_resource type="PackedScene" uid="uid://dr1hykfog1h85" path="res://scenes/components/loading_tatus.tscn" id="25_3436m"]
[ext_resource type="Script" path="res://scripts/ui/world/release_focus.gd" id="26_u6afs"]

[sub_resource type="ShaderMaterial" id="ShaderMaterial_be6ex"]
resource_local_to_scene = true
shader = ExtResource("10_2auwe")
shader_parameter/ext_texture_is_bgra = null
shader_parameter/show_render = null

[sub_resource type="Curve" id="Curve_rju31"]
_data = [Vector2(0.0876494, 0.913189), 0.0, -0.118897, 0, 0, Vector2(0.50996, 0.316361), -1.65368, -1.65368, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
point_count = 3

[sub_resource type="CurveTexture" id="CurveTexture_yw30u"]
curve = SubResource("Curve_rju31")

[sub_resource type="ShaderMaterial" id="ShaderMaterial_bspld"]
shader = ExtResource("18_sat0u")
shader_parameter/UVScale = Vector2(0.9, 0.9)
shader_parameter/BlurAmount = 2.5
shader_parameter/VignetteColor = Color(0.126, 0.1719, 0.18, 1)
shader_parameter/Vignette = SubResource("CurveTexture_yw30u")

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_axrau"]
bg_color = Color(1, 1, 1, 1)

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_vnx4g"]
bg_color = Color(0, 0, 0, 1)
corner_radius_top_left = 25
corner_radius_top_right = 25
corner_radius_bottom_right = 25
corner_radius_bottom_left = 25

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_jiaac"]
bg_color = Color(0, 0, 0, 0.2)

[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_tnu6q"]

[sub_resource type="Animation" id="Animation_beyyv"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("WorldCanvas/RenderResult/HideOnPress:disabled")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}

[sub_resource type="Animation" id="Animation_tper3"]
resource_name = "focused"
length = 0.25
step = 0.05
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("WorldCanvas/RenderResult/HideOnPress:disabled")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}

[sub_resource type="Animation" id="Animation_77flb"]
resource_name = "initial"
length = 0.25
step = 0.05
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("WorldCanvas/RenderResult/HideOnPress:disabled")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}

[sub_resource type="AnimationLibrary" id="AnimationLibrary_sld6k"]
_data = {
"RESET": SubResource("Animation_beyyv"),
"focused": SubResource("Animation_tper3"),
"initial": SubResource("Animation_77flb")
}

[node name="World" type="Control" node_paths=PackedStringArray("render_result")]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
size_flags_vertical = 3
script = ExtResource("12_jdwjt")
ui_events = ExtResource("9_ir58h")
gate_events = ExtResource("2_q7cvi")
command_events = ExtResource("6_18mgg")
render_result = NodePath("WorldCanvas/RenderResult")

[node name="GateLoader" type="Node" parent="."]
script = ExtResource("1_uxhy6")
gate_events = ExtResource("2_q7cvi")
connect_timeout = 10.0

[node name="SandboxManager" type="Node" parent="." node_paths=PackedStringArray("render_result", "snbx_logger")]
script = ExtResource("6_368sj")
gate_events = ExtResource("2_q7cvi")
render_result = NodePath("../WorldCanvas/RenderResult")
snbx_logger = NodePath("../SandboxLogger")
snbx_executable = ExtResource("4_shus3")
snbx_env = ExtResource("8_a6dvr")

[node name="SandboxLogger" type="Node" parent="."]
script = ExtResource("9_fikc8")
gate_events = ExtResource("2_q7cvi")
api = ExtResource("10_vhc7k")

[node name="InputSync" type="Node" parent="." node_paths=PackedStringArray("render_result")]
script = ExtResource("8_1blsi")
gate_events = ExtResource("2_q7cvi")
ui_events = ExtResource("9_ir58h")
render_result = NodePath("../WorldCanvas/RenderResult")

[node name="CommandSync" type="CommandSync" parent="."]
script = ExtResource("10_cqo55")
gate_events = ExtResource("2_q7cvi")
command_events = ExtResource("6_18mgg")

[node name="ProcessChecker" type="Node" parent="." node_paths=PackedStringArray("snbx_manager")]
script = ExtResource("11_72cjp")
gate_events = ExtResource("2_q7cvi")
command_events = ExtResource("6_18mgg")
snbx_manager = NodePath("../SandboxManager")

[node name="WorldCanvas" type="Control" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 0

[node name="RenderResult" type="TextureRect" parent="WorldCanvas"]
texture_filter = 2
material = SubResource("ShaderMaterial_be6ex")
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
expand_mode = 1
stretch_mode = 5
script = ExtResource("5_nlg2s")
gate_events = ExtResource("2_q7cvi")
command_events = ExtResource("6_18mgg")
ui_events = ExtResource("9_ir58h")

[node name="HideOnPress" type="TextureButton" parent="WorldCanvas/RenderResult"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
focus_mode = 0

[node name="Foreground" type="Control" parent="." node_paths=PackedStringArray("splash_screen", "vignette_blur", "click_anywhere")]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
script = ExtResource("17_6e5v3")
gate_events = ExtResource("2_q7cvi")
ui_events = ExtResource("9_ir58h")
splash_screen = NodePath("SplashScreen")
vignette_blur = NodePath("VignetteBlur")
click_anywhere = NodePath("ClickAnywhere")

[node name="SplashScreen" type="TextureRect" parent="Foreground"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
expand_mode = 1
stretch_mode = 6

[node name="VignetteBlur" type="Panel" parent="Foreground"]
material = SubResource("ShaderMaterial_bspld")
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_axrau")
script = ExtResource("19_415fa")
blur_amount = 2.5
blur_amount_started = 1.2
uv_scale = Vector2(0.9, 0.9)
uv_scale_startd = Vector2(0.97, 0.97)

[node name="ClickAnywhere" type="Label" parent="Foreground"]
layout_mode = 1
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -175.5
offset_top = 50.0
offset_right = 175.5
offset_bottom = 75.0
grow_horizontal = 2
text = "Click anywhere to play → ESC to exit"
label_settings = ExtResource("20_v1648")

[node name="GateInfo" type="VBoxContainer" parent="Foreground" node_paths=PackedStringArray("image", "image_darken", "title", "description", "gate_status")]
layout_mode = 1
anchors_preset = 2
anchor_top = 1.0
anchor_bottom = 1.0
offset_left = 50.0
offset_top = -90.0
offset_right = 562.0
offset_bottom = -50.0
grow_vertical = 0
theme_override_constants/separation = 12
alignment = 2
script = ExtResource("18_q06xu")
gate_events = ExtResource("2_q7cvi")
image = NodePath("Image/TextureRect")
image_darken = NodePath("Image/Panel")
title = NodePath("Title")
description = NodePath("RichTextLabel")
gate_status = [NodePath("Space2"), NodePath("LoadingStatus")]

[node name="Image" type="Panel" parent="Foreground/GateInfo"]
clip_children = 1
custom_minimum_size = Vector2(0, 256)
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_vnx4g")

[node name="TextureRect" type="TextureRect" parent="Foreground/GateInfo/Image"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
expand_mode = 1
stretch_mode = 6

[node name="Panel" type="Panel" parent="Foreground/GateInfo/Image"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_jiaac")

[node name="Space" type="Control" parent="Foreground/GateInfo"]
custom_minimum_size = Vector2(0, 6)
layout_mode = 2

[node name="Title" type="RichTextLabel" parent="Foreground/GateInfo"]
layout_mode = 2
focus_mode = 2
mouse_default_cursor_shape = 1
theme_override_colors/default_color = Color(0.831373, 0.831373, 0.831373, 1)
theme_override_colors/selection_color = Color(0.419608, 0.231373, 0.929412, 0.588235)
theme_override_fonts/normal_font = ExtResource("19_tkqw6")
theme_override_fonts/mono_font = ExtResource("20_hoet7")
theme_override_fonts/italics_font = ExtResource("21_lpegk")
theme_override_fonts/bold_italics_font = ExtResource("22_i5khx")
theme_override_fonts/bold_font = ExtResource("23_t1gqo")
theme_override_font_sizes/bold_italics_font_size = 20
theme_override_font_sizes/italics_font_size = 20
theme_override_font_sizes/mono_font_size = 20
theme_override_font_sizes/normal_font_size = 20
theme_override_font_sizes/bold_font_size = 15
theme_override_styles/focus = SubResource("StyleBoxEmpty_tnu6q")
text = "Welcome"
fit_content = true
context_menu_enabled = true
selection_enabled = true
script = ExtResource("26_u6afs")

[node name="RichTextLabel" type="RichTextLabel" parent="Foreground/GateInfo"]
layout_mode = 2
focus_mode = 2
mouse_default_cursor_shape = 1
theme_override_colors/default_color = Color(0.831373, 0.831373, 0.831373, 1)
theme_override_colors/selection_color = Color(0.419608, 0.231373, 0.929412, 0.588235)
theme_override_fonts/normal_font = ExtResource("19_tkqw6")
theme_override_fonts/mono_font = ExtResource("20_hoet7")
theme_override_fonts/italics_font = ExtResource("21_lpegk")
theme_override_fonts/bold_italics_font = ExtResource("22_i5khx")
theme_override_fonts/bold_font = ExtResource("23_t1gqo")
theme_override_font_sizes/bold_italics_font_size = 15
theme_override_font_sizes/italics_font_size = 15
theme_override_font_sizes/mono_font_size = 15
theme_override_font_sizes/normal_font_size = 15
theme_override_font_sizes/bold_font_size = 15
theme_override_styles/focus = SubResource("StyleBoxEmpty_tnu6q")
bbcode_enabled = true
text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat"
fit_content = true
context_menu_enabled = true
selection_enabled = true
script = ExtResource("26_u6afs")

[node name="Space2" type="Control" parent="Foreground/GateInfo"]
custom_minimum_size = Vector2(0, 16)
layout_mode = 2

[node name="LoadingStatus" parent="Foreground/GateInfo" instance=ExtResource("25_3436m")]
layout_mode = 2

[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_sld6k")
}
script = ExtResource("18_sx3kr")
ui_events = ExtResource("9_ir58h")
gate_events = ExtResource("2_q7cvi")

[node name="NotResponding" parent="." instance=ExtResource("17_kwbm3")]
visible = false
layout_mode = 1

[connection signal="pressed" from="WorldCanvas/RenderResult/HideOnPress" to="." method="hide_ui"]
