From 424e98aa0d591b7002f49df33a742f1a0f6613d7 Mon Sep 17 00:00:00 2001 From: Hyun Seungmin Date: Tue, 19 Dec 2023 12:22:49 +0900 Subject: [PATCH 1/2] add several scenes --- frontend/Saver-22b-godot/scenes/intro.tscn | 96 +++++++++++++++++++ frontend/Saver-22b-godot/scenes/main.tscn | 7 ++ .../scenes/select_village.tscn | 19 ++++ 3 files changed, 122 insertions(+) create mode 100644 frontend/Saver-22b-godot/scenes/intro.tscn create mode 100644 frontend/Saver-22b-godot/scenes/main.tscn create mode 100644 frontend/Saver-22b-godot/scenes/select_village.tscn diff --git a/frontend/Saver-22b-godot/scenes/intro.tscn b/frontend/Saver-22b-godot/scenes/intro.tscn new file mode 100644 index 00000000..ac155cfb --- /dev/null +++ b/frontend/Saver-22b-godot/scenes/intro.tscn @@ -0,0 +1,96 @@ +[gd_scene format=3 uid="uid://cg773cnsx4rb0"] + +[node name="Intro" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="Background" type="ColorRect" parent="."] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_top = -1.0 +offset_bottom = -1.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="Title" type="ColorRect" parent="."] +custom_minimum_size = Vector2(800, 250) +layout_mode = 1 +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -400.0 +offset_top = -240.0 +offset_right = 400.0 +offset_bottom = 10.0005 +grow_horizontal = 2 +grow_vertical = 2 +color = Color(0, 0, 0, 1) + +[node name="Label" type="Label" parent="Title"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_font_sizes/font_size = 70 +text = "SAVER 22B" +horizontal_alignment = 1 +vertical_alignment = 1 + +[node name="QuitButtonContainer" type="ColorRect" parent="."] +layout_mode = 1 +anchors_preset = 2 +anchor_top = 1.0 +anchor_bottom = 1.0 +offset_left = 100.0 +offset_top = -280.0 +offset_right = 600.0 +offset_bottom = -160.0 +grow_vertical = 0 +color = Color(0, 0, 0, 1) + +[node name="Button" type="Button" parent="QuitButtonContainer"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_type_variation = &"FlatButton" +theme_override_font_sizes/font_size = 70 +text = "Quit" + +[node name="PlayButtonContainer" type="ColorRect" parent="."] +layout_mode = 1 +anchors_preset = 3 +anchor_left = 1.0 +anchor_top = 1.0 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = -600.0 +offset_top = -280.0 +offset_right = -100.0 +offset_bottom = -160.0 +grow_horizontal = 0 +grow_vertical = 0 +color = Color(0, 0, 0, 1) + +[node name="Button" type="Button" parent="PlayButtonContainer"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_type_variation = &"FlatButton" +theme_override_font_sizes/font_size = 70 +text = "Play" diff --git a/frontend/Saver-22b-godot/scenes/main.tscn b/frontend/Saver-22b-godot/scenes/main.tscn new file mode 100644 index 00000000..7de7df03 --- /dev/null +++ b/frontend/Saver-22b-godot/scenes/main.tscn @@ -0,0 +1,7 @@ +[gd_scene load_steps=2 format=3 uid="uid://cjvywwt132ot5"] + +[ext_resource type="PackedScene" uid="uid://cg773cnsx4rb0" path="res://scenes/intro.tscn" id="1_hqty0"] + +[node name="Main" type="Node"] + +[node name="Intro" parent="." instance=ExtResource("1_hqty0")] diff --git a/frontend/Saver-22b-godot/scenes/select_village.tscn b/frontend/Saver-22b-godot/scenes/select_village.tscn new file mode 100644 index 00000000..79a0f6ad --- /dev/null +++ b/frontend/Saver-22b-godot/scenes/select_village.tscn @@ -0,0 +1,19 @@ +[gd_scene format=3 uid="uid://cl8vvgnebwyi1"] + +[node name="SelectVillage" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="Background" type="ColorRect" parent="."] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_top = -1.0 +offset_bottom = -1.0 +grow_horizontal = 2 +grow_vertical = 2 From 0e54ce7d7e9500c71450b53987b51ddf0e57bdaa Mon Sep 17 00:00:00 2001 From: Hyun Seungmin Date: Tue, 19 Dec 2023 12:23:05 +0900 Subject: [PATCH 2/2] remove main_scene and update project settings --- frontend/Saver-22b-godot/main_scene.tscn | 38 ------------------------ frontend/Saver-22b-godot/project.godot | 5 ++-- 2 files changed, 3 insertions(+), 40 deletions(-) delete mode 100644 frontend/Saver-22b-godot/main_scene.tscn diff --git a/frontend/Saver-22b-godot/main_scene.tscn b/frontend/Saver-22b-godot/main_scene.tscn deleted file mode 100644 index d3daee61..00000000 --- a/frontend/Saver-22b-godot/main_scene.tscn +++ /dev/null @@ -1,38 +0,0 @@ -[gd_scene format=3 uid="uid://4qejtaco6225"] - -[node name="Node2D" type="Node2D"] - -[node name="SubViewportContainer" type="SubViewportContainer" parent="."] -offset_right = 1920.0 -offset_bottom = 1080.0 -stretch = true - -[node name="SubViewport" type="SubViewport" parent="SubViewportContainer"] -handle_input_locally = false -size = Vector2i(1920, 1080) -render_target_update_mode = 4 - -[node name="Scene#1" type="ColorRect" parent="SubViewportContainer/SubViewport"] -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 - -[node name="Scene#2" type="ColorRect" parent="SubViewportContainer/SubViewport"] -visible = false -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 -color = Color(0.862745, 0.862745, 0.862745, 1) - -[node name="Scene#3" type="ColorRect" parent="SubViewportContainer/SubViewport"] -visible = false -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 -color = Color(0.639216, 0.639216, 0.639216, 1) diff --git a/frontend/Saver-22b-godot/project.godot b/frontend/Saver-22b-godot/project.godot index de10be1a..320bd000 100644 --- a/frontend/Saver-22b-godot/project.godot +++ b/frontend/Saver-22b-godot/project.godot @@ -11,15 +11,16 @@ config_version=5 [application] config/name="Saver-22b-godot" -run/main_scene="res://main_scene.tscn" +run/main_scene="res://scenes/main.tscn" config/features=PackedStringArray("4.2", "GL Compatibility") +boot_splash/bg_color=Color(0.141176, 0.141176, 0.141176, 1) config/icon="res://icon.svg" [display] window/size/viewport_width=1920 window/size/viewport_height=1080 -window/stretch/mode="viewport" +window/stretch/mode="canvas_items" [dotnet]