diff --git a/gymkhana/addons/escoria-ui-return-monkey-island/game.tscn b/gymkhana/addons/escoria-ui-return-monkey-island/game.tscn index 6bc85967..72fcc128 100644 --- a/gymkhana/addons/escoria-ui-return-monkey-island/game.tscn +++ b/gymkhana/addons/escoria-ui-return-monkey-island/game.tscn @@ -6,7 +6,7 @@ [ext_resource path="res://gymkhana/addons/escoria-ui-return-monkey-island/esc_rich_tooltip.tscn" type="PackedScene" id=4] [ext_resource path="res://gymkhana/addons/escoria-ui-return-monkey-island/game.gd" type="Script" id=5] [ext_resource path="res://gymkhana/addons/escoria-ui-return-monkey-island/icons/music-double-note.svg" type="Texture" id=6] -[ext_resource path="res://addons/escoria-core/ui_library/menus/main_menu/main_menu.tscn" type="PackedScene" id=7] +[ext_resource path="res://gymkhana/addons/escoria-ui-return-monkey-island/menus/main_menu/main_menu.tscn" type="PackedScene" id=7] [ext_resource path="res://addons/escoria-core/ui_library/menus/pause_menu/pause_menu.tscn" type="PackedScene" id=8] [ext_resource path="res://gymkhana/addons/escoria-ui-return-monkey-island/theme.tres" type="Theme" id=9] [ext_resource path="res://gymkhana/addons/escoria-ui-return-monkey-island/icons/cog-64-hover.svg" type="Texture" id=10] diff --git a/gymkhana/addons/escoria-ui-return-monkey-island/menus/main_menu/main_menu.gd b/gymkhana/addons/escoria-ui-return-monkey-island/menus/main_menu/main_menu.gd new file mode 100644 index 00000000..41666cd1 --- /dev/null +++ b/gymkhana/addons/escoria-ui-return-monkey-island/menus/main_menu/main_menu.gd @@ -0,0 +1,47 @@ +# A simple main menu +extends Control + + +# Start the game +func _on_new_game_pressed(): + escoria.new_game() + + +# Show the load slots +func _on_load_game_pressed(): + $main.hide() + $load_game.refresh_savegames() + $load_game.show() + + +# Show the options panel +func _on_options_pressed(): + $main.hide() + $options.show() + + +# Quit the game +func _on_quit_pressed(): + escoria.quit() + + +# Hide the options panel again +func _on_options_back_button_pressed(): + reset() + + +# Hide the load panel +func _on_load_game_back_button_pressed(): + reset() + + +# Resets the UI to initial state +func reset(): + $load_game.hide() + $options.hide() + $main.show() + +func _on_new_without_intro_pressed(): + escoria.globals_manager.set_global("cocina_delante_intro_played",true) + escoria.globals_manager.set_global("cocina_intro_played",true) + escoria.new_game() diff --git a/gymkhana/addons/escoria-ui-return-monkey-island/menus/main_menu/main_menu.tscn b/gymkhana/addons/escoria-ui-return-monkey-island/menus/main_menu/main_menu.tscn new file mode 100644 index 00000000..fc7c9c05 --- /dev/null +++ b/gymkhana/addons/escoria-ui-return-monkey-island/menus/main_menu/main_menu.tscn @@ -0,0 +1,111 @@ +[gd_scene load_steps=5 format=2] + +[ext_resource path="res://gymkhana/addons/escoria-ui-return-monkey-island/menus/main_menu/main_menu.gd" type="Script" id=1] +[ext_resource path="res://addons/escoria-core/design/escoria-logo-small.png" type="Texture" id=3] +[ext_resource path="res://addons/escoria-core/ui_library/menus/options/options.tscn" type="PackedScene" id=4] +[ext_resource path="res://addons/escoria-core/ui_library/menus/load_save/load/load_game.tscn" type="PackedScene" id=5] + +[node name="main_menu" type="Control"] +anchor_right = 1.0 +anchor_bottom = 1.0 +script = ExtResource( 1 ) + +[node name="load_game" parent="." instance=ExtResource( 5 )] +visible = false + +[node name="options" parent="." instance=ExtResource( 4 )] +visible = false + +[node name="main" type="Control" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 + +[node name="Panel" type="Panel" parent="main"] +anchor_right = 1.0 +anchor_bottom = 1.0 +__meta__ = { +"_edit_use_anchors_": false, +"_editor_description_": "" +} + +[node name="main" type="VBoxContainer" parent="main"] +anchor_left = 0.5 +anchor_right = 0.5 +anchor_bottom = 1.0 +margin_left = -308.0 +margin_right = 308.0 +custom_constants/separation = 100 +alignment = 1 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="TextureRect" type="TextureRect" parent="main/main"] +margin_top = 55.0 +margin_right = 616.0 +margin_bottom = 355.0 +texture = ExtResource( 3 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="buttons" type="VBoxContainer" parent="main/main"] +margin_top = 455.0 +margin_right = 616.0 +margin_bottom = 695.0 +custom_constants/separation = 10 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="new_game" type="Button" parent="main/main/buttons"] +margin_right = 616.0 +margin_bottom = 150.0 +rect_min_size = Vector2( 0, 150 ) +size_flags_vertical = 3 +text = "NEW_GAME" +__meta__ = { +"_edit_use_anchors_": false +} +[node name="new_game_without_intro" type="Button" parent="main/main/buttons"] +margin_right = 616.0 +margin_bottom = 270.0 +size_flags_vertical = 3 +text = "NEW_GAME (without intro)" +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="load_game" type="Button" parent="main/main/buttons"] +margin_top = 160.0 +margin_right = 616.0 +margin_bottom = 180.0 +text = "LOAD_GAME" +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="options" type="Button" parent="main/main/buttons"] +margin_top = 190.0 +margin_right = 616.0 +margin_bottom = 210.0 +text = "OPTIONS" + +[node name="quit" type="Button" parent="main/main/buttons"] +margin_top = 220.0 +margin_right = 616.0 +margin_bottom = 240.0 +text = "QUIT" +__meta__ = { +"_edit_use_anchors_": false +} + + + +[connection signal="back_button_pressed" from="load_game" to="." method="_on_load_game_back_button_pressed"] +[connection signal="back_button_pressed" from="options" to="." method="_on_options_back_button_pressed"] +[connection signal="pressed" from="main/main/buttons/new_game" to="." method="_on_new_game_pressed"] +[connection signal="pressed" from="main/main/buttons/load_game" to="." method="_on_load_game_pressed"] +[connection signal="pressed" from="main/main/buttons/options" to="." method="_on_options_pressed"] +[connection signal="pressed" from="main/main/buttons/quit" to="." method="_on_quit_pressed"] +[connection signal="pressed" from="main/main/buttons/new_game_without_intro" to="." method="_on_new_without_intro_pressed"] diff --git a/gymkhana/rooms/turno_cocina/cocina_delante/esc/cocina_delante.esc b/gymkhana/rooms/turno_cocina/cocina_delante/esc/cocina_delante.esc index eedcebe1..599befb6 100644 --- a/gymkhana/rooms/turno_cocina/cocina_delante/esc/cocina_delante.esc +++ b/gymkhana/rooms/turno_cocina/cocina_delante/esc/cocina_delante.esc @@ -1,7 +1,7 @@ :setup # Uncomment to disable intro scene -set_global cocina_delante_intro_played true -set_global cocina_intro_played true +#set_global cocina_delante_intro_played true +#set_global cocina_intro_played true > [!cocina_delante_intro_played] accept_input SKIP stop_snd