[gd_scene load_steps=16 format=3 uid="uid://cr1mgp6bgxh64"]
[ext_resource type="Theme" uid="uid://d3ywcokn5ddy8" path="res://ui/theme.tres" id="1_aykd4"]
[ext_resource type="Script" path="res://ui/finish.gd" id="1_crs2w"]
[ext_resource type="Script" path="res://ui/diff.gd" id="2_gtres"]
[ext_resource type="SystemFont" uid="uid://d2klp6vxh5l2d" path="res://ui/cascadiabold.tres" id="3_qktla"]
[ext_resource type="StyleBox" uid="uid://bxi4jeh5lf468" path="res://ui/assets/wide_button_focus.stylebox" id="4_dck0l"]
[ext_resource type="SystemFont" uid="uid://bkjqtc5i64r3j" path="res://ui/ubuntu.tres" id="5_llemr"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_bgqa0"]
bg_color = Color(0, 0.168627, 0.211765, 1)
corner_radius_top_left = 100
corner_radius_top_right = 100
corner_radius_bottom_right = 100
corner_radius_bottom_left = 100
anti_aliasing = false
[sub_resource type="LabelSettings" id="LabelSettings_f3a8x"]
line_spacing = 0.0
font_size = 200
font_color = Color(0.933333, 0.909804, 0.835294, 1)
outline_size = 25
outline_color = Color(0.25098, 0.25098, 0.25098, 1)
shadow_size = 20
shadow_color = Color(0, 0, 0, 0.392157)
shadow_offset = Vector2(10, 10)
[sub_resource type="LabelSettings" id="LabelSettings_m62vt"]
font = ExtResource("3_qktla")
font_size = 100
font_color = Color(0.992157, 0.964706, 0.890196, 1)
shadow_size = 20
shadow_color = Color(0, 0, 0, 0.27451)
shadow_offset = Vector2(5, 10)
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_22wem"]
content_margin_left = 250.0
[sub_resource type="LabelSettings" id="LabelSettings_irfee"]
font = ExtResource("3_qktla")
font_size = 50
font_color = Color(0.521569, 0.6, 0, 1)
shadow_size = 12
shadow_color = Color(0, 0, 0, 0.27451)
shadow_offset = Vector2(2, 5)
[sub_resource type="GDScript" id="GDScript_ihn3u"]
resource_name = "retry_button"
script/source = "extends Button
func _on_finish_difference(diff: SplitsDifference.Change) -> void:
match diff:
SplitsDifference.Change.GAIN: text = \"play again\"
SplitsDifference.Change.LOSS: text = \"try again\"
_: text = \"play again\"
"
[sub_resource type="LabelSettings" id="LabelSettings_uqsxe"]
font = ExtResource("5_llemr")
font_size = 25
font_color = Color(0.992157, 0.964706, 0.890196, 1)
shadow_size = 4
shadow_color = Color(0.168627, 0.168627, 0.168627, 0.568627)
[sub_resource type="GDScript" id="GDScript_fnuhm"]
resource_name = "helpfull"
script/source = "extends Label
var db := {
SplitsDifference.Change.GAIN: PackedStringArray([
\"nice time\",
\"great job\",
\"groundbreaking time\",
\"couldnt do better myself\",
\"motivational message\",
\"see you on the next map\",
\"that corner was perfect\",
\"such speed\"
]),
SplitsDifference.Change.LOSS:
PackedStringArray([
\"theres always next time\",
\"maybe take that corner tighter\", # i love it when the game backseats me
\"if you take that turn wider youll get more speed\",
\"that corner was rough\",
\"too much speed, eh\",
\"i hate it when things go wrong for a inexplicable reason\",
\"better luck next time\",
\"the great thing about video games is you can try again\",
\"sad times\",
\"wow, thats a good ghost\"
]),
SplitsDifference.Change.EQUAL:
PackedStringArray([
\"wow, you matched that time\",
\"1/100 moment\",
\"get the camera, the time was matched\",
\"its not even like theres a deterministic physics engine\"
]),
-1:
PackedStringArray([
\"good first try\",
\"a decent attempt\",
\"wr pace next attempt\",
\"hard map innit\",
\"are you going to go again\"
])
}
func _on_finish_difference(diff) -> void:
text = db[diff][randi() % len(db[diff])]
"
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_hc6gh"]
bg_color = Color(0.6, 0.6, 0.6, 0)
border_width_left = 5
border_width_top = 5
border_width_right = 5
border_width_bottom = 5
border_color = Color(0.576471, 0.631373, 0.631373, 1)
corner_radius_top_left = 100
corner_radius_top_right = 100
corner_radius_bottom_right = 100
corner_radius_bottom_left = 100
corner_detail = 12
anti_aliasing = false
[node name="finish" type="ColorRect" node_paths=PackedStringArray("diff", "time_", "flag", "focus", "retry", "quit", "next")]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("1_aykd4")
color = Color(0.121569, 0.121569, 0.121569, 0.709804)
script = ExtResource("1_crs2w")
diff = NodePath("center/panel/container/splits/diff")
time_ = NodePath("center/panel/container/splits/hcontainer/time")
flag = NodePath("center/panel/container/splits/hcontainer/flag")
focus = NodePath("center/panel/container/buttons/retry")
retry = NodePath("center/panel/container/buttons/retry")
quit = NodePath("center/panel/container/buttons/quit")
next = NodePath("center/panel/container/buttons/next")
[node name="center" type="CenterContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="panel" type="PanelContainer" parent="center"]
clip_children = 2
custom_minimum_size = Vector2(1000, 0)
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_bgqa0")
[node name="container" type="VBoxContainer" parent="center/panel"]
layout_mode = 2
[node name="splits" type="VBoxContainer" parent="center/panel/container"]
layout_mode = 2
size_flags_horizontal = 4
theme_override_constants/separation = -70
[node name="hcontainer" type="HBoxContainer" parent="center/panel/container/splits"]
custom_minimum_size = Vector2(0, 240)
layout_mode = 2
theme_override_constants/separation = 50
alignment = 1
[node name="flag" type="Label" parent="center/panel/container/splits/hcontainer"]
layout_mode = 2
size_flags_vertical = 1
text = ""
label_settings = SubResource("LabelSettings_f3a8x")
horizontal_alignment = 1
vertical_alignment = 2
[node name="time" type="Label" parent="center/panel/container/splits/hcontainer"]
layout_mode = 2
text = "1:24.187"
label_settings = SubResource("LabelSettings_m62vt")
[node name="diff" type="Label" parent="center/panel/container/splits"]
layout_mode = 2
theme_override_styles/normal = SubResource("StyleBoxEmpty_22wem")
text = "-0:00.125"
label_settings = SubResource("LabelSettings_irfee")
script = ExtResource("2_gtres")
gain_color = Color(0.521569, 0.6, 0, 1)
loss_color = Color(0.921569, 0.32549, 0.317647, 1)
[node name="spacer" type="Control" parent="center/panel/container"]
custom_minimum_size = Vector2(0, 20)
layout_mode = 2
[node name="buttons" type="VBoxContainer" parent="center/panel/container"]
layout_mode = 2
theme_override_constants/separation = 5
[node name="retry" type="Button" parent="center/panel/container/buttons"]
layout_mode = 2
tooltip_text = "go for another go?"
theme_override_styles/focus = ExtResource("4_dck0l")
text = "play again"
script = SubResource("GDScript_ihn3u")
[node name="next" type="Button" parent="center/panel/container/buttons"]
layout_mode = 2
theme_override_styles/focus = ExtResource("4_dck0l")
text = "next map"
[node name="quit" type="Button" parent="center/panel/container/buttons"]
layout_mode = 2
theme_override_styles/focus = ExtResource("4_dck0l")
text = "exit"
[node name="helpfull" type="Label" parent="center/panel/container"]
custom_minimum_size = Vector2(0, 40)
layout_mode = 2
text = "hi"
label_settings = SubResource("LabelSettings_uqsxe")
horizontal_alignment = 1
vertical_alignment = 1
script = SubResource("GDScript_fnuhm")
[node name="border" type="Panel" parent="center/panel"]
layout_mode = 2
mouse_filter = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_hc6gh")
[connection signal="difference" from="." to="center/panel/container/buttons/retry" method="_on_finish_difference"]
[connection signal="difference" from="." to="center/panel/container/helpfull" method="_on_finish_difference"]