[gd_scene format=3 uid="uid://c35md0oc82je2"]

[ext_resource type="Texture2D" uid="uid://cyl18yt5hxyb5" path="res://assets/sprites/dialogue_ui.BMP" id="1_cno1m"]
[ext_resource type="Theme" uid="uid://dx26d6py3n8xi" path="res://resources/main_ui_theme.tres" id="1_qpcyj"]
[ext_resource type="Texture2D" uid="uid://dj621xih5cam7" path="res://assets/sprites/dialogue_continue.BMP" id="2_qpcyj"]
[ext_resource type="AudioStream" uid="uid://5ndo4w06umsa" path="res://assets/sounds/SE020.WAV" id="4_hover"]

[sub_resource type="GDScript" id="GDScript_hover"]
resource_name = "DialogueButtonHover"
script/source = "extends HBoxContainer

@onready var hover_sfx: AudioStreamPlayer = $HoverSFX
@onready var hover_node: TextureRect = $Hover

func _ready() -> void:
	hover_node.visible = false
	for child in get_children():
		if child is TextureButton:
			child.mouse_entered.connect(_on_button_hovered.bind(child))
			child.mouse_exited.connect(_on_button_unhovered)

func _on_button_hovered(button: TextureButton) -> void:
	hover_sfx.play()
	hover_node.reparent(button, false)
	hover_node.visible = true

func _on_button_unhovered() -> void:
	hover_node.visible = false
"

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

[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_bhyd5"]
blend_mode = 1

[sub_resource type="AtlasTexture" id="AtlasTexture_2e7es"]
atlas = ExtResource("1_cno1m")
region = Rect2(0, 0, 800, 228)

[sub_resource type="LabelSettings" id="LabelSettings_bhyd5"]

[sub_resource type="AtlasTexture" id="AtlasTexture_xcky8"]
atlas = ExtResource("2_qpcyj")
region = Rect2(0, 0, 30, 27)

[sub_resource type="AtlasTexture" id="AtlasTexture_q4mab"]
atlas = ExtResource("2_qpcyj")
region = Rect2(30, 0, 30, 27)

[sub_resource type="AtlasTexture" id="AtlasTexture_o6y45"]
atlas = ExtResource("2_qpcyj")
region = Rect2(60, 0, 30, 27)

[sub_resource type="AtlasTexture" id="AtlasTexture_18hkw"]
atlas = ExtResource("2_qpcyj")
region = Rect2(90, 0, 30, 27)

[sub_resource type="AtlasTexture" id="AtlasTexture_w4lkc"]
atlas = ExtResource("2_qpcyj")
region = Rect2(120, 0, 30, 27)

[sub_resource type="AtlasTexture" id="AtlasTexture_kolsc"]
atlas = ExtResource("2_qpcyj")
region = Rect2(150, 0, 30, 27)

[sub_resource type="AtlasTexture" id="AtlasTexture_6myds"]
atlas = ExtResource("2_qpcyj")
region = Rect2(180, 0, 30, 27)

[sub_resource type="AtlasTexture" id="AtlasTexture_6ge27"]
atlas = ExtResource("2_qpcyj")
region = Rect2(210, 0, 30, 27)

[sub_resource type="AtlasTexture" id="AtlasTexture_i6h2p"]
atlas = ExtResource("2_qpcyj")
region = Rect2(240, 0, 30, 27)

[sub_resource type="AtlasTexture" id="AtlasTexture_6kf4t"]
atlas = ExtResource("2_qpcyj")
region = Rect2(270, 0, 30, 27)

[sub_resource type="AtlasTexture" id="AtlasTexture_dox35"]
atlas = ExtResource("2_qpcyj")
region = Rect2(300, 0, 30, 27)

[sub_resource type="AtlasTexture" id="AtlasTexture_lapyf"]
atlas = ExtResource("2_qpcyj")
region = Rect2(330, 0, 30, 27)

[sub_resource type="SpriteFrames" id="SpriteFrames_61f6o"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_xcky8")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_q4mab")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_o6y45")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_18hkw")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_w4lkc")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_kolsc")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_6myds")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_6ge27")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_i6h2p")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_6kf4t")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_dox35")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_lapyf")
}],
"loop": true,
"name": &"default",
"speed": 10.0
}]

[sub_resource type="AtlasTexture" id="AtlasTexture_cno1m"]
atlas = ExtResource("1_cno1m")
region = Rect2(1, 257, 22, 25)

[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_qpcyj"]
blend_mode = 1

[sub_resource type="AtlasTexture" id="AtlasTexture_gkt67"]
atlas = ExtResource("1_cno1m")
region = Rect2(114, 255, 18, 17)

[sub_resource type="AtlasTexture" id="AtlasTexture_qpcyj"]
atlas = ExtResource("1_cno1m")
region = Rect2(23, 257, 22, 25)

[sub_resource type="AtlasTexture" id="AtlasTexture_bhyd5"]
atlas = ExtResource("1_cno1m")
region = Rect2(45, 257, 22, 25)

[sub_resource type="AtlasTexture" id="AtlasTexture_61f6o"]
atlas = ExtResource("1_cno1m")
region = Rect2(67, 257, 22, 25)

[sub_resource type="AtlasTexture" id="AtlasTexture_6ui40"]
atlas = ExtResource("1_cno1m")
region = Rect2(89, 257, 22, 25)

[node name="DialogueScene" type="Control" unique_id=1681812093]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("1_qpcyj")

[node name="BackgroundColor" type="Panel" parent="." unique_id=452136654]
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_cno1m")

[node name="VerticalScreen" type="VBoxContainer" parent="." unique_id=529668640]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
alignment = 2

[node name="DialogueBox" type="TextureRect" parent="VerticalScreen" unique_id=1915405731]
self_modulate = Color(1, 1, 1, 0.078431375)
material = SubResource("CanvasItemMaterial_bhyd5")
layout_mode = 2
size_flags_vertical = 8
texture = SubResource("AtlasTexture_2e7es")

[node name="Text" type="VBoxContainer" parent="VerticalScreen/DialogueBox" unique_id=939057416]
layout_mode = 0
offset_left = 50.0
offset_top = 100.0
offset_right = 750.0
offset_bottom = 175.0

[node name="Speaker" type="RichTextLabel" parent="VerticalScreen/DialogueBox/Text" unique_id=956457649]
custom_minimum_size = Vector2(0, 25)
layout_mode = 2
bbcode_enabled = true
text = "Test Speaker"
scroll_active = false

[node name="Body" type="Label" parent="VerticalScreen/DialogueBox/Text" unique_id=364265039]
layout_mode = 2
size_flags_vertical = 3
text = "Lorem ipsum dolor"
label_settings = SubResource("LabelSettings_bhyd5")

[node name="VerticalDBox" type="VBoxContainer" parent="VerticalScreen/DialogueBox" unique_id=1761650639]
layout_mode = 1
anchors_preset = 12
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 0

[node name="BottomRow" type="HBoxContainer" parent="VerticalScreen/DialogueBox/VerticalDBox" unique_id=1729668164]
layout_mode = 2
alignment = 2

[node name="Control" type="Control" parent="VerticalScreen/DialogueBox/VerticalDBox/BottomRow" unique_id=924058102]
custom_minimum_size = Vector2(400, 0)
layout_mode = 2

[node name="ContinuePlacer" type="Control" parent="VerticalScreen/DialogueBox/VerticalDBox/BottomRow" unique_id=1584205137]
layout_mode = 2

[node name="ContinueSprite" type="AnimatedSprite2D" parent="VerticalScreen/DialogueBox/VerticalDBox/BottomRow/ContinuePlacer" unique_id=1540136989]
position = Vector2(0, 5)
sprite_frames = SubResource("SpriteFrames_61f6o")
autoplay = "default"

[node name="Spacer2" type="Control" parent="VerticalScreen/DialogueBox/VerticalDBox/BottomRow" unique_id=1533161680]
layout_mode = 2
size_flags_horizontal = 3

[node name="DialogueButtons" type="HBoxContainer" parent="VerticalScreen/DialogueBox/VerticalDBox/BottomRow" unique_id=1572455129]
layout_mode = 2
script = SubResource("GDScript_hover")

[node name="HoverSFX" type="AudioStreamPlayer" parent="VerticalScreen/DialogueBox/VerticalDBox/BottomRow/DialogueButtons"]
stream = ExtResource("4_hover")

[node name="Hover" type="TextureRect" parent="VerticalScreen/DialogueBox/VerticalDBox/BottomRow/DialogueButtons" unique_id=1721109871]
self_modulate = Color(1, 1, 1, 0.28235295)
material = SubResource("CanvasItemMaterial_qpcyj")
layout_mode = 0
offset_left = 2.0
offset_top = -7.0
offset_right = 20.0
offset_bottom = 18.0
texture = SubResource("AtlasTexture_gkt67")

[node name="History" type="TextureButton" parent="VerticalScreen/DialogueBox/VerticalDBox/BottomRow/DialogueButtons" unique_id=535301616]
layout_mode = 2
texture_normal = SubResource("AtlasTexture_cno1m")

[node name="Auto" type="TextureButton" parent="VerticalScreen/DialogueBox/VerticalDBox/BottomRow/DialogueButtons" unique_id=1254069471]
layout_mode = 2
texture_normal = SubResource("AtlasTexture_qpcyj")

[node name="FastForward" type="TextureButton" parent="VerticalScreen/DialogueBox/VerticalDBox/BottomRow/DialogueButtons" unique_id=1088780299]
layout_mode = 2
texture_normal = SubResource("AtlasTexture_bhyd5")

[node name="Skip" type="TextureButton" parent="VerticalScreen/DialogueBox/VerticalDBox/BottomRow/DialogueButtons" unique_id=1854859021]
layout_mode = 2
texture_normal = SubResource("AtlasTexture_61f6o")

[node name="Hide" type="TextureButton" parent="VerticalScreen/DialogueBox/VerticalDBox/BottomRow/DialogueButtons" unique_id=1549897664]
layout_mode = 2
texture_normal = SubResource("AtlasTexture_6ui40")
