diff --git a/media/image/explode2.png b/media/image/explode2.png index 3acf8d6..d28f400 100644 Binary files a/media/image/explode2.png and b/media/image/explode2.png differ diff --git a/media/image/slam.png b/media/image/slam.png index dd843a4..93843cb 100644 Binary files a/media/image/slam.png and b/media/image/slam.png differ diff --git a/media/image/tinyArrow.png b/media/image/tinyArrow.png index cf8bb16..7ac2316 100644 Binary files a/media/image/tinyArrow.png and b/media/image/tinyArrow.png differ diff --git a/src/map/1-1.tscn b/src/map/1-1.tscn index b607f75..ad80798 100644 --- a/src/map/1-1.tscn +++ b/src/map/1-1.tscn @@ -55,13 +55,9 @@ margin_left = 12.0 margin_top = -7.0 margin_right = 42.0 margin_bottom = 6.0 -custom_colors/font_color = Color( 1, 0.945098, 0.909804, 1 ) custom_colors/font_color_shadow = Color( 0, 0, 0, 1 ) custom_constants/shadow_as_outline = 1 custom_fonts/font = ExtResource( 8 ) text = "move" -__meta__ = { -"_edit_use_anchors_": false -} [editable path="GameCamera"] diff --git a/src/map/1-2.tscn b/src/map/1-2.tscn index e017b88..5d62de9 100644 --- a/src/map/1-2.tscn +++ b/src/map/1-2.tscn @@ -55,13 +55,9 @@ margin_left = 12.0 margin_top = -7.0 margin_right = 50.0 margin_bottom = 6.0 -custom_colors/font_color = Color( 1, 0.945098, 0.909804, 1 ) custom_colors/font_color_shadow = Color( 0, 0, 0, 1 ) custom_constants/shadow_as_outline = 1 custom_fonts/font = ExtResource( 8 ) text = "jump" -__meta__ = { -"_edit_use_anchors_": false -} [editable path="GameCamera"] diff --git a/src/map/1-3.tscn b/src/map/1-3.tscn index 8a41d0a..c5a8a49 100644 --- a/src/map/1-3.tscn +++ b/src/map/1-3.tscn @@ -66,7 +66,6 @@ margin_left = 15.0 margin_top = -6.0 margin_right = 45.0 margin_bottom = 7.0 -custom_colors/font_color = Color( 1, 0.945098, 0.909804, 1 ) custom_colors/font_color_shadow = Color( 0, 0, 0, 1 ) custom_constants/shadow_as_outline = 1 custom_fonts/font = ExtResource( 9 ) diff --git a/src/map/1-4.tscn b/src/map/1-4.tscn index fae27cb..73d3ddc 100644 --- a/src/map/1-4.tscn +++ b/src/map/1-4.tscn @@ -62,13 +62,9 @@ margin_left = 12.0 margin_top = -6.0 margin_right = 32.0 margin_bottom = 7.0 -custom_colors/font_color = Color( 1, 0.945098, 0.909804, 1 ) custom_colors/font_color_shadow = Color( 0, 0, 0, 1 ) custom_constants/shadow_as_outline = 1 custom_fonts/font = ExtResource( 9 ) text = "lift" -__meta__ = { -"_edit_use_anchors_": false -} [editable path="GameCamera"] diff --git a/src/menu/StartMenu.gd b/src/menu/StartMenu.gd index 43b5192..03f6dc2 100644 --- a/src/menu/StartMenu.gd +++ b/src/menu/StartMenu.gd @@ -4,12 +4,9 @@ var menu_list : Label var menu_items := [] onready var menu_stuff := $Control/Menu.get_children() - -onready var main_list : Label = $Menu/List var main_items := ["play", "options", "credits"] onready var quit_menu : Control = $Menu/Quit -onready var quit_list : Label = $Menu/Quit/List var quit_items := ["yes", "no"] var cursor := 0 @@ -17,7 +14,6 @@ var cursor := 0 var timer := 0.1 var clock := 0.0 -onready var node_cursor : ColorRect = $Menu/Cursor onready var node_audio_scroll : AudioStreamPlayer = $AudioScroll onready var node_audio_play : AudioStreamPlayer = $AudioPlay onready var node_audio_options : AudioStreamPlayer = $AudioOptions @@ -29,7 +25,6 @@ onready var node_audio_no : AudioStreamPlayer = $AudioNo var is_input = true func _ready(): - menu_list = main_list switch_menu("main") UI.keys(true, true, false) @@ -37,9 +32,14 @@ func _input(event): if !is_input: return if event.is_action_pressed("action"): - if menu_list == quit_list: + if menu_items == quit_items: cursor = 1 menu_select() + else: + cursor = 0 + write_menu() + switch_menu("quit") + node_audio_quit.play() elif event.is_action_pressed("jump"): menu_select() else: @@ -56,7 +56,7 @@ func write_menu(): menu_stuff[i].modulate = Color("ff004d") if i == cursor else Color("83769c") func menu_select(): - match menu_items[cursor].to_lower(): + match menu_items[clamp(cursor, 0, menu_items.size() - 1)].to_lower(): "play": Shared.wipe_scene(Shared.level_select_path) is_input = false @@ -69,11 +69,6 @@ func menu_select(): Shared.wipe_scene(Shared.credits_path) is_input = false node_audio_credits.play() - "quit": - cursor = -1 - write_menu() - switch_menu("quit") - node_audio_quit.play() "yes": is_input = false node_audio_yes.play() @@ -92,17 +87,9 @@ func switch_menu(arg): match arg: "main": quit_menu.visible = false - menu_list = main_list menu_items = main_items - - node_cursor.get_parent().remove_child(node_cursor) - main_list.add_child(node_cursor) "quit": quit_menu.visible = true - menu_list = quit_list menu_items = quit_items cursor = 1 - - node_cursor.get_parent().remove_child(node_cursor) - quit_list.add_child(node_cursor) write_menu() diff --git a/src/menu/StartMenu.tscn b/src/menu/StartMenu.tscn index 31e561b..90b4ad8 100644 --- a/src/menu/StartMenu.tscn +++ b/src/menu/StartMenu.tscn @@ -45,38 +45,10 @@ pause_mode = 2 script = ExtResource( 3 ) [node name="Menu" type="Node2D" parent="."] -visible = false position = Vector2( -18, 8 ) z_index = 20 z_as_relative = false -[node name="Cursor" type="ColorRect" parent="Menu"] -show_behind_parent = true -margin_left = 15.0 -margin_top = 47.0 -margin_right = 44.0 -margin_bottom = 57.0 -color = Color( 0.113725, 0.168627, 0.32549, 1 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="List" type="Label" parent="Menu"] -margin_left = 12.0 -margin_top = 48.0 -margin_right = 48.0 -margin_bottom = 89.0 -custom_colors/font_color = Color( 1, 0.945098, 0.909804, 1 ) -custom_fonts/font = ExtResource( 1 ) -text = "play -options -credits -quit" -align = 1 -__meta__ = { -"_edit_use_anchors_": false -} - [node name="Quit" type="Control" parent="Menu"] visible = false margin_left = 80.0