[gd_scene load_steps=3 format=3 uid="uid://dauphincraft_mainmenu"]

[ext_resource type="Script" path="res://scripts/ambience/MainMenu.gd" id="1_mainmenu"]

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_btn"]
bg_color = Color(0.05, 0.15, 0.3, 0.75)
border_width_left = 2
border_width_top = 2
border_width_right = 2
border_width_bottom = 2
border_color = Color(0.3, 0.8, 1.0, 1.0)
corner_radius_top_left = 6
corner_radius_top_right = 6
corner_radius_bottom_right = 6
corner_radius_bottom_left = 6

[node name="MainMenu" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
script = ExtResource("1_mainmenu")

[node name="Background" type="ColorRect" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
color = Color(0.02, 0.08, 0.18, 1.0)

[node name="CenterContainer" type="VBoxContainer" parent="."]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -200.0
offset_top = -160.0
offset_right = 200.0
offset_bottom = 160.0
alignment = 1

[node name="Title" type="Label" parent="CenterContainer"]
layout_mode = 2
text = "DAUPHINCRAFT"
horizontal_alignment = 1
theme_override_font_sizes/font_size = 80
theme_override_colors/font_color = Color(0.7, 0.95, 1.0, 1.0)
theme_override_colors/font_shadow_color = Color(0.0, 0.3, 0.6, 0.8)
theme_override_constants/shadow_offset_x = 3
theme_override_constants/shadow_offset_y = 3

[node name="Subtitle" type="Label" parent="CenterContainer"]
layout_mode = 2
text = "Un monde voxel sous l'océan"
horizontal_alignment = 1
theme_override_font_sizes/font_size = 22
theme_override_colors/font_color = Color(0.5, 0.75, 0.9, 0.85)

[node name="Spacer" type="Control" parent="CenterContainer"]
layout_mode = 2
custom_minimum_size = Vector2(0, 30)

[node name="DiveButton" type="Button" parent="CenterContainer"]
layout_mode = 2
custom_minimum_size = Vector2(300, 56)
text = "Plonger"
theme_override_font_sizes/font_size = 26
theme_override_colors/font_color = Color(0.8, 0.97, 1.0, 1.0)
theme_override_styles/normal = SubResource("StyleBoxFlat_btn")

[node name="OptionsButton" type="Button" parent="CenterContainer"]
layout_mode = 2
custom_minimum_size = Vector2(300, 56)
text = "Options"
theme_override_font_sizes/font_size = 26
theme_override_colors/font_color = Color(0.8, 0.97, 1.0, 1.0)
theme_override_styles/normal = SubResource("StyleBoxFlat_btn")

[node name="QuitButton" type="Button" parent="CenterContainer"]
layout_mode = 2
custom_minimum_size = Vector2(300, 56)
text = "Quitter"
theme_override_font_sizes/font_size = 26
theme_override_colors/font_color = Color(0.8, 0.97, 1.0, 1.0)
theme_override_styles/normal = SubResource("StyleBoxFlat_btn")

[node name="Credits" type="Label" parent="."]
layout_mode = 1
anchors_preset = 12
anchor_left = 0.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_top = -30.0
text = "Assets: Kenney, OpenGameArt, Freesound (voir CREDITS.md)"
horizontal_alignment = 1
theme_override_font_sizes/font_size = 13
theme_override_colors/font_color = Color(0.4, 0.6, 0.7, 0.6)

[node name="OptionsPopup" type="Window" parent="."]
title = "Options"
size = Vector2i(360, 220)
visible = false

[node name="VBox" type="VBoxContainer" parent="OptionsPopup"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 20.0
offset_top = 20.0
offset_right = -20.0
offset_bottom = -20.0

[node name="MusicLabel" type="Label" parent="OptionsPopup/VBox"]
text = "Volume Musique"

[node name="MusicSlider" type="HSlider" parent="OptionsPopup/VBox"]
layout_mode = 2
min_value = 0.0
max_value = 1.0
step = 0.01
value = 0.7

[node name="SFXLabel" type="Label" parent="OptionsPopup/VBox"]
text = "Volume SFX"

[node name="SFXSlider" type="HSlider" parent="OptionsPopup/VBox"]
layout_mode = 2
min_value = 0.0
max_value = 1.0
step = 0.01
value = 0.8

[connection signal="pressed" from="CenterContainer/DiveButton" to="." method="_on_dive_pressed"]
[connection signal="pressed" from="CenterContainer/OptionsButton" to="." method="_on_options_pressed"]
[connection signal="pressed" from="CenterContainer/QuitButton" to="." method="_on_quit_pressed"]
[connection signal="value_changed" from="OptionsPopup/VBox/MusicSlider" to="." method="_on_music_slider_value_changed"]
[connection signal="value_changed" from="OptionsPopup/VBox/SFXSlider" to="." method="_on_sfx_slider_value_changed"]
