diff --git a/default.theme b/default.theme index ebc7db2..ab9bca8 100644 Binary files a/default.theme and b/default.theme differ diff --git a/main.gd b/main.gd new file mode 100644 index 0000000..b9ebaf4 --- /dev/null +++ b/main.gd @@ -0,0 +1,22 @@ +extends Control +export var MainMenuPath := @'MainMenu' +onready var MainMenu := get_node(MainMenuPath) + +const TouchGamePath := 'res://scenes/RadialGame.tscn' +const StepGamePath := 'res://scenes/StepGame.tscn' +var TouchGameScene := preload(TouchGamePath) +var StepGameScene := preload(StepGamePath) + +var ActiveGame: Node = null + +func _on_MainMenu_start_stepgame() -> void: + MainMenu.hide() + ActiveGame = StepGameScene.instance() + add_child_below_node(MainMenu, ActiveGame) + + +func _on_MainMenu_start_touchgame() -> void: + MainMenu.hide() + ActiveGame = TouchGameScene.instance() + add_child_below_node(MainMenu, ActiveGame) + ActiveGame.alignment_horizontal = AspectRatioContainer.ALIGN_BEGIN diff --git a/main.tscn b/main.tscn index 531be96..55f90f7 100644 --- a/main.tscn +++ b/main.tscn @@ -1,22 +1,21 @@ -[gd_scene load_steps=5 format=2] +[gd_scene load_steps=6 format=2] -[ext_resource path="res://RadialGame.tscn" type="PackedScene" id=1] +[ext_resource path="res://scenes/MainMenu.tscn" type="PackedScene" id=1] [ext_resource path="res://scripts/TouchInput.gd" type="Script" id=2] [ext_resource path="res://default.theme" type="Theme" id=3] -[ext_resource path="res://OptionPanel.tscn" type="PackedScene" id=13] +[ext_resource path="res://main.gd" type="Script" id=4] +[ext_resource path="res://scenes/OptionPanel.tscn" type="PackedScene" id=13] [node name="main" type="Control"] anchor_right = 1.0 anchor_bottom = 1.0 theme = ExtResource( 3 ) +script = ExtResource( 4 ) __meta__ = { "_edit_use_anchors_": false } -[node name="RadialGame" parent="." instance=ExtResource( 1 )] -anchor_right = 0.0 -margin_right = 600.0 -rect_min_size = Vector2( 1080, 0 ) +[node name="MainMenu" parent="." instance=ExtResource( 1 )] [node name="OptionPanel" parent="." instance=ExtResource( 13 )] anchor_left = 1.0 @@ -35,3 +34,6 @@ script = ExtResource( 2 ) __meta__ = { "_edit_use_anchors_": false } + +[connection signal="start_stepgame" from="MainMenu" to="." method="_on_MainMenu_start_stepgame"] +[connection signal="start_touchgame" from="MainMenu" to="." method="_on_MainMenu_start_touchgame"] diff --git a/mainmenu_theme.tres b/mainmenu_theme.tres new file mode 100644 index 0000000..71bf9b6 --- /dev/null +++ b/mainmenu_theme.tres @@ -0,0 +1,90 @@ +[gd_resource type="Theme" load_steps=7 format=2] + +[ext_resource path="res://assets/fonts/Sniglet-Regular.ttf" type="DynamicFontData" id=1] + +[sub_resource type="StyleBoxFlat" id=3] +content_margin_left = 24.0 +content_margin_right = 24.0 +content_margin_top = 4.0 +content_margin_bottom = 4.0 +bg_color = Color( 0.184314, 0.180392, 0.192157, 1 ) +border_width_left = 12 +border_width_top = 4 +border_width_right = 12 +border_width_bottom = 4 +border_color = Color( 0.172549, 0.164706, 0.196078, 1 ) +corner_radius_top_left = 16 +corner_radius_top_right = 16 +corner_radius_bottom_right = 16 +corner_radius_bottom_left = 16 + +[sub_resource type="StyleBoxFlat" id=4] +content_margin_left = 24.0 +content_margin_right = 24.0 +content_margin_top = 4.0 +content_margin_bottom = 4.0 +bg_color = Color( 0.517647, 0.482353, 0.647059, 1 ) +border_width_left = 12 +border_width_top = 4 +border_width_right = 12 +border_width_bottom = 4 +border_color = Color( 0.172549, 0.164706, 0.196078, 1 ) +corner_radius_top_left = 16 +corner_radius_top_right = 16 +corner_radius_bottom_right = 16 +corner_radius_bottom_left = 16 + +[sub_resource type="StyleBoxFlat" id=2] +content_margin_left = 24.0 +content_margin_right = 24.0 +content_margin_top = 4.0 +content_margin_bottom = 4.0 +bg_color = Color( 0.235294, 0.227451, 0.266667, 1 ) +border_width_left = 12 +border_width_top = 4 +border_width_right = 12 +border_width_bottom = 4 +border_color = Color( 0.172549, 0.164706, 0.196078, 1 ) +corner_radius_top_left = 16 +corner_radius_top_right = 16 +corner_radius_bottom_right = 16 +corner_radius_bottom_left = 16 + +[sub_resource type="StyleBoxFlat" id=5] +content_margin_left = 24.0 +content_margin_right = 24.0 +content_margin_top = 4.0 +content_margin_bottom = 4.0 +bg_color = Color( 0.376471, 0.356863, 0.443137, 1 ) +border_width_left = 12 +border_width_top = 4 +border_width_right = 12 +border_width_bottom = 4 +border_color = Color( 0.709804, 0.709804, 1, 1 ) +border_blend = true +corner_radius_top_left = 16 +corner_radius_top_right = 16 +corner_radius_bottom_right = 16 +corner_radius_bottom_left = 16 +shadow_color = Color( 0.423529, 0.670588, 1, 0.372549 ) +shadow_size = 6 + +[sub_resource type="DynamicFont" id=1] +size = 48 +outline_size = 4 +outline_color = Color( 0, 0, 0, 1 ) +font_data = ExtResource( 1 ) + +[resource] +default_font = SubResource( 1 ) +Button/colors/font_color = Color( 0.88, 0.88, 0.88, 1 ) +Button/colors/font_color_disabled = Color( 0.9, 0.9, 0.9, 0.2 ) +Button/colors/font_color_hover = Color( 0.827451, 0.788235, 1, 1 ) +Button/colors/font_color_pressed = Color( 1, 1, 1, 1 ) +Button/constants/hseparation = 2 +Button/fonts/font = null +Button/styles/disabled = SubResource( 3 ) +Button/styles/focus = SubResource( 4 ) +Button/styles/hover = SubResource( 2 ) +Button/styles/normal = SubResource( 2 ) +Button/styles/pressed = SubResource( 5 ) diff --git a/project.godot b/project.godot index e1f30d7..5a935dc 100644 --- a/project.godot +++ b/project.godot @@ -35,7 +35,6 @@ Video="*res://singletons/Video.gd" [debug] -settings/fps/force_fps=120 gdscript/warnings/unused_variable=false gdscript/warnings/shadowed_variable=false gdscript/warnings/unused_argument=false diff --git a/FontTesting.tscn b/scenes/FontTesting.tscn similarity index 72% rename from FontTesting.tscn rename to scenes/FontTesting.tscn index 36b3de1..aa6dcf7 100644 --- a/FontTesting.tscn +++ b/scenes/FontTesting.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=2] -[ext_resource path="res://FontTesting.gd" type="Script" id=1] +[ext_resource path="res://scripts/FontTesting.gd" type="Script" id=1] [node name="Control" type="Control"] anchor_right = 1.0 diff --git a/scenes/MainMenu.tscn b/scenes/MainMenu.tscn new file mode 100644 index 0000000..1ae2922 --- /dev/null +++ b/scenes/MainMenu.tscn @@ -0,0 +1,58 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://mainmenu_theme.tres" type="Theme" id=1] +[ext_resource path="res://scripts/MainMenu.gd" type="Script" id=2] + +[node name="MainMenu" type="Control"] +anchor_right = 1.0 +anchor_bottom = 1.0 +theme = ExtResource( 1 ) +script = ExtResource( 2 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="VBoxContainer" type="VBoxContainer" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +custom_constants/separation = 16 +alignment = 1 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="btn_touch" type="Button" parent="VBoxContainer"] +margin_left = 451.0 +margin_top = 380.0 +margin_right = 629.0 +margin_bottom = 448.0 +size_flags_horizontal = 4 +text = "Touch" + +[node name="btn_step" type="Button" parent="VBoxContainer"] +margin_left = 465.0 +margin_top = 464.0 +margin_right = 614.0 +margin_bottom = 532.0 +size_flags_horizontal = 4 +text = "Step" + +[node name="btn_settings" type="Button" parent="VBoxContainer"] +margin_left = 426.0 +margin_top = 548.0 +margin_right = 653.0 +margin_bottom = 616.0 +size_flags_horizontal = 4 +text = "Settings" + +[node name="btn_quit" type="Button" parent="VBoxContainer"] +margin_left = 471.0 +margin_top = 632.0 +margin_right = 608.0 +margin_bottom = 700.0 +size_flags_horizontal = 4 +text = "Quit" + +[connection signal="pressed" from="VBoxContainer/btn_touch" to="." method="_on_btn_touch_pressed"] +[connection signal="pressed" from="VBoxContainer/btn_step" to="." method="_on_btn_step_pressed"] +[connection signal="pressed" from="VBoxContainer/btn_quit" to="." method="quit"] diff --git a/Menu.tscn b/scenes/Menu.tscn similarity index 95% rename from Menu.tscn rename to scenes/Menu.tscn index 676f38e..ce31539 100644 --- a/Menu.tscn +++ b/scenes/Menu.tscn @@ -11,6 +11,8 @@ _data = [ Vector2( -1, -1 ), 0.0, 0.0, 0, 0, Vector2( 0, 0 ), 2.0, 2.0, 1, 1, Ve [node name="Menu" type="Control"] material = ExtResource( 3 ) +anchor_right = 1.0 +anchor_bottom = 1.0 rect_clip_content = true script = ExtResource( 2 ) __meta__ = { diff --git a/NoteHandler.tscn b/scenes/NoteHandler.tscn similarity index 100% rename from NoteHandler.tscn rename to scenes/NoteHandler.tscn diff --git a/OptionPanel.tscn b/scenes/OptionPanel.tscn similarity index 100% rename from OptionPanel.tscn rename to scenes/OptionPanel.tscn diff --git a/RadialGame.tscn b/scenes/RadialGame.tscn similarity index 92% rename from RadialGame.tscn rename to scenes/RadialGame.tscn index e207413..a6b7424 100644 --- a/RadialGame.tscn +++ b/scenes/RadialGame.tscn @@ -1,21 +1,21 @@ [gd_scene load_steps=21 format=2] -[ext_resource path="res://scripts/InputHandler.gd" type="Script" id=1] +[ext_resource path="res://scripts/NoteViewport.gd" type="Script" id=1] [ext_resource path="res://assets/text-4k.png" type="Texture" id=2] -[ext_resource path="res://assets/fonts/Sniglet-Regular.ttf" type="DynamicFontData" id=3] -[ext_resource path="res://scripts/ScreenFilter.gd" type="Script" id=4] -[ext_resource path="res://scripts/NoteViewport.gd" type="Script" id=5] -[ext_resource path="res://scripts/NotePainter.gd" type="Script" id=6] -[ext_resource path="res://scripts/NoteHandler.gd" type="Script" id=8] -[ext_resource path="res://scripts/Receptors.gd" type="Script" id=9] -[ext_resource path="res://shaders/notelines.shader" type="Shader" id=10] -[ext_resource path="res://shaders/notemesh.shader" type="Shader" id=11] -[ext_resource path="res://shaders/receptors.shader" type="Shader" id=12] -[ext_resource path="res://scripts/Bezel.gd" type="Script" id=13] -[ext_resource path="res://Menu.tscn" type="PackedScene" id=15] +[ext_resource path="res://scripts/NotePainter.gd" type="Script" id=3] +[ext_resource path="res://scripts/InputHandler.gd" type="Script" id=4] +[ext_resource path="res://scripts/Bezel.gd" type="Script" id=5] +[ext_resource path="res://scripts/NoteHandler.gd" type="Script" id=6] +[ext_resource path="res://assets/fonts/Sniglet-Regular.ttf" type="DynamicFontData" id=7] +[ext_resource path="res://scripts/Receptors.gd" type="Script" id=8] +[ext_resource path="res://scripts/ScreenFilter.gd" type="Script" id=9] +[ext_resource path="res://scenes/Menu.tscn" type="PackedScene" id=10] +[ext_resource path="res://shaders/receptors.shader" type="Shader" id=11] +[ext_resource path="res://shaders/notemesh.shader" type="Shader" id=12] +[ext_resource path="res://shaders/notelines.shader" type="Shader" id=13] [sub_resource type="ShaderMaterial" id=1] -shader = ExtResource( 12 ) +shader = ExtResource( 11 ) shader_param/num_receptors = 8 shader_param/receptor_offset = 0.392699 shader_param/line_color = Color( 0, 0, 1, 1 ) @@ -29,14 +29,14 @@ shader_param/px2 = 0.00217391 shader_param/alpha = 1.0 [sub_resource type="ShaderMaterial" id=2] -shader = ExtResource( 11 ) +shader = ExtResource( 12 ) shader_param/bps = null shader_param/star_color = null shader_param/held_color = null shader_param/screen_size = null [sub_resource type="ShaderMaterial" id=3] -shader = ExtResource( 10 ) +shader = ExtResource( 13 ) shader_param/line_color = Color( 0.8, 0.8, 1, 0.8 ) shader_param/line_color_double = Color( 1, 1, 0.6, 0.9 ) shader_param/dot_color = Color( 1, 1, 1, 0.8 ) @@ -55,7 +55,7 @@ shader_param/array_size = 256 size = 48 outline_size = 2 outline_color = Color( 0, 0, 0, 1 ) -font_data = ExtResource( 3 ) +font_data = ExtResource( 7 ) [sub_resource type="GDScript" id=5] script/source = "extends Label @@ -91,9 +91,7 @@ __meta__ = { margin_right = 1080.0 margin_bottom = 1080.0 -[node name="video" type="TextureRect" parent="Square" groups=[ -"VideoTexRects", -]] +[node name="video" type="TextureRect" parent="Square" groups=["VideoTexRects"]] anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 @@ -110,7 +108,7 @@ __meta__ = { anchor_right = 1.0 anchor_bottom = 1.0 color = Color( 0, 0, 0, 1 ) -script = ExtResource( 4 ) +script = ExtResource( 9 ) __meta__ = { "_edit_use_anchors_": false } @@ -119,7 +117,7 @@ __meta__ = { material = SubResource( 1 ) anchor_right = 1.0 anchor_bottom = 1.0 -script = ExtResource( 9 ) +script = ExtResource( 8 ) __meta__ = { "_edit_use_anchors_": false } @@ -127,7 +125,7 @@ __meta__ = { [node name="NoteHandler" type="Control" parent="Square"] anchor_right = 1.0 anchor_bottom = 1.0 -script = ExtResource( 8 ) +script = ExtResource( 6 ) __meta__ = { "_edit_use_anchors_": false } @@ -137,7 +135,7 @@ size = Vector2( 1080, 1080 ) transparent_bg = true usage = 1 render_target_v_flip = true -script = ExtResource( 5 ) +script = ExtResource( 1 ) [node name="Center" type="Node2D" parent="Square/NoteHandler/Viewport"] position = Vector2( 540, 540 ) @@ -178,14 +176,12 @@ __meta__ = { material = SubResource( 6 ) anchor_right = 1.0 anchor_bottom = 1.0 -script = ExtResource( 6 ) +script = ExtResource( 3 ) __meta__ = { "_edit_use_anchors_": false } -[node name="Menu" parent="Square" instance=ExtResource( 15 )] -anchor_right = 1.0 -anchor_bottom = 1.0 +[node name="Menu" parent="Square" instance=ExtResource( 10 )] NoteHandlerPath = NodePath("../NoteHandler") ReceptorsPath = NodePath("../Receptors") ease_curve = SubResource( 7 ) @@ -193,7 +189,7 @@ ease_curve = SubResource( 7 ) [node name="Bezel" type="Control" parent="Square"] anchor_right = 1.0 anchor_bottom = 1.0 -script = ExtResource( 13 ) +script = ExtResource( 5 ) __meta__ = { "_edit_use_anchors_": false } @@ -201,7 +197,7 @@ __meta__ = { [node name="InputHandler" type="Control" parent="Square"] anchor_right = 1.0 anchor_bottom = 1.0 -script = ExtResource( 1 ) +script = ExtResource( 4 ) __meta__ = { "_edit_use_anchors_": false } diff --git a/scenes/StepGame.tscn b/scenes/StepGame.tscn new file mode 100644 index 0000000..944bd6b --- /dev/null +++ b/scenes/StepGame.tscn @@ -0,0 +1,199 @@ +[gd_scene load_steps=20 format=2] + +[ext_resource path="res://scripts/NoteViewport.gd" type="Script" id=1] +[ext_resource path="res://assets/text-4k.png" type="Texture" id=2] +[ext_resource path="res://scripts/NotePainter.gd" type="Script" id=3] +[ext_resource path="res://scripts/InputHandler.gd" type="Script" id=4] +[ext_resource path="res://scripts/NoteHandler.gd" type="Script" id=6] +[ext_resource path="res://assets/fonts/Sniglet-Regular.ttf" type="DynamicFontData" id=7] +[ext_resource path="res://scripts/Receptors.gd" type="Script" id=8] +[ext_resource path="res://scripts/ScreenFilter.gd" type="Script" id=9] +[ext_resource path="res://scenes/Menu.tscn" type="PackedScene" id=10] +[ext_resource path="res://shaders/receptors.shader" type="Shader" id=11] +[ext_resource path="res://shaders/notemesh.shader" type="Shader" id=12] +[ext_resource path="res://shaders/notelines.shader" type="Shader" id=13] + +[sub_resource type="ShaderMaterial" id=1] +shader = ExtResource( 11 ) +shader_param/num_receptors = 8 +shader_param/receptor_offset = 0.392699 +shader_param/line_color = Color( 0, 0, 1, 1 ) +shader_param/dot_color = Color( 0, 0, 1, 1 ) +shader_param/shadow_color = Color( 0, 0, 0, 0.57 ) +shader_param/line_thickness = 0.00434783 +shader_param/dot_radius = 0.026087 +shader_param/shadow_thickness = 0.0173913 +shader_param/px = 0.00108696 +shader_param/px2 = 0.00217391 +shader_param/alpha = 1.0 + +[sub_resource type="ShaderMaterial" id=2] +shader = ExtResource( 12 ) +shader_param/bps = null +shader_param/star_color = null +shader_param/held_color = null +shader_param/screen_size = null + +[sub_resource type="ShaderMaterial" id=3] +shader = ExtResource( 13 ) +shader_param/line_color = Color( 0.8, 0.8, 1, 0.8 ) +shader_param/line_color_double = Color( 1, 1, 0.6, 0.9 ) +shader_param/dot_color = Color( 1, 1, 1, 0.8 ) +shader_param/bps = 1.0 +shader_param/line_thickness = 0.012 +shader_param/line_thickness_min = 0.0 +shader_param/dot_thickness = 0.033 +shader_param/dot_fullbright_thickness = 0.013 +shader_param/max_angle = 1.0708 +shader_param/max_dist = 1.25 +shader_param/array_postmul = Vector3( 1, 1, 1 ) +shader_param/array_sidelen = 16 +shader_param/array_size = 256 + +[sub_resource type="DynamicFont" id=4] +size = 48 +outline_size = 2 +outline_color = Color( 0, 0, 0, 1 ) +font_data = ExtResource( 7 ) + +[sub_resource type="GDScript" id=5] +script/source = "extends Label + +const colors = [Color.gray, Color.lightgray, Color.aqua, Color.gold] + + +func _on_NoteHandler_combo_changed(value) -> void: + text = str(value) + visible = (value > 0) + add_color_override('font_color', colors[int(min(3, value/50))]) + + +func _on_NoteHandler_finished_song(song_key, score_data) -> void: + visible = false +" + +[sub_resource type="CanvasItemMaterial" id=6] +blend_mode = 4 + +[sub_resource type="Curve" id=7] +min_value = -1.0 +_data = [ Vector2( -1, -1 ), 0.0, 0.0, 0, 0, Vector2( 0, 0 ), 2.0, 2.0, 1, 1, Vector2( 1, 1 ), 0.0, 0.0, 0, 0 ] + +[node name="StepGame" type="AspectRatioContainer"] +anchor_right = 1.0 +anchor_bottom = 1.0 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Square" type="Control" parent="."] +margin_right = 1080.0 +margin_bottom = 1080.0 + +[node name="video" type="TextureRect" parent="Square" groups=["VideoTexRects"]] +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +rect_pivot_offset = Vector2( 540, 540 ) +mouse_filter = 2 +expand = true +stretch_mode = 6 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="ScreenFilter" type="ColorRect" parent="Square"] +anchor_right = 1.0 +anchor_bottom = 1.0 +color = Color( 0, 0, 0, 1 ) +script = ExtResource( 9 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Receptors" type="Control" parent="Square"] +material = SubResource( 1 ) +anchor_right = 1.0 +anchor_bottom = 1.0 +script = ExtResource( 8 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="NoteHandler" type="Control" parent="Square"] +anchor_right = 1.0 +anchor_bottom = 1.0 +script = ExtResource( 6 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Viewport" type="Viewport" parent="Square/NoteHandler"] +size = Vector2( 1080, 1080 ) +transparent_bg = true +usage = 1 +render_target_v_flip = true +script = ExtResource( 1 ) + +[node name="Center" type="Node2D" parent="Square/NoteHandler/Viewport"] +position = Vector2( 540, 540 ) + +[node name="SlideTrailHandler" type="Node2D" parent="Square/NoteHandler/Viewport/Center"] + +[node name="JudgeText" type="MeshInstance2D" parent="Square/NoteHandler/Viewport/Center"] +texture = ExtResource( 2 ) + +[node name="meshinstance" type="MeshInstance2D" parent="Square/NoteHandler/Viewport/Center"] +material = SubResource( 2 ) + +[node name="notelines" type="MeshInstance2D" parent="Square/NoteHandler/Viewport/Center"] +material = SubResource( 3 ) + +[node name="lbl_combo" type="Label" parent="Square/NoteHandler"] +visible = false +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +margin_left = -20.0 +margin_top = -7.0 +margin_right = 20.0 +margin_bottom = 7.0 +grow_horizontal = 2 +grow_vertical = 2 +custom_fonts/font = SubResource( 4 ) +text = "0" +align = 1 +valign = 1 +script = SubResource( 5 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Painter" type="Control" parent="Square"] +material = SubResource( 6 ) +anchor_right = 1.0 +anchor_bottom = 1.0 +script = ExtResource( 3 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Menu" parent="Square" instance=ExtResource( 10 )] +NoteHandlerPath = NodePath("../NoteHandler") +ReceptorsPath = NodePath("../Receptors") +ease_curve = SubResource( 7 ) + +[node name="InputHandler" type="Control" parent="Square"] +anchor_right = 1.0 +anchor_bottom = 1.0 +script = ExtResource( 4 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[connection signal="combo_changed" from="Square/NoteHandler" to="Square/NoteHandler/lbl_combo" method="_on_NoteHandler_combo_changed"] +[connection signal="finished_song" from="Square/NoteHandler" to="Square/NoteHandler/lbl_combo" method="_on_NoteHandler_finished_song"] +[connection signal="column_pressed" from="Square/InputHandler" to="Square/NoteHandler" method="_on_InputHandler_column_pressed"] +[connection signal="column_released" from="Square/InputHandler" to="Square/NoteHandler" method="_on_InputHandler_column_released"] diff --git a/FontTesting.gd b/scripts/FontTesting.gd similarity index 100% rename from FontTesting.gd rename to scripts/FontTesting.gd diff --git a/scripts/MainMenu.gd b/scripts/MainMenu.gd new file mode 100644 index 0000000..2b25d67 --- /dev/null +++ b/scripts/MainMenu.gd @@ -0,0 +1,12 @@ +extends Control +signal start_touchgame +signal start_stepgame + +func quit() -> void: + get_tree().quit() + +func _on_btn_touch_pressed() -> void: + emit_signal('start_touchgame') + +func _on_btn_step_pressed() -> void: + emit_signal('start_stepgame') diff --git a/scripts/Menu.gd b/scripts/Menu.gd index ce88427..4667c0c 100644 --- a/scripts/Menu.gd +++ b/scripts/Menu.gd @@ -1,5 +1,4 @@ #tool -#extends Node2D extends Control export var NoteHandlerPath := @'../Center/NoteHandler' diff --git a/singletons/FileLoader.gd b/singletons/FileLoader.gd index 3b17833..c26fec4 100644 --- a/singletons/FileLoader.gd +++ b/singletons/FileLoader.gd @@ -540,7 +540,8 @@ class SM: metadata['num_holds'] = num_holds metadata['num_rolls'] = num_rolls metadata['num_mines'] = num_mines - return [metadata, notes] + metadata['notes'] = notes + return metadata static func load_file(filename: String) -> Array: # Output is [metadata, [[meta0, chart0], ..., [metaN, chartN]]] @@ -652,8 +653,8 @@ func load_filelist(filelist: Array, directory=''): 'sm': # Stepmania, multiple charts var res = SM.load_file(filename) for chart in res[1]: - var diff = chart[0].difficulty_str - charts[diff] = chart[1] + var diff = chart.difficulty_str + charts[diff] = chart.notes _: pass return charts