diff --git a/media/image/9slice.png b/media/image/9slice.png index a414878..bec9e08 100644 Binary files a/media/image/9slice.png and b/media/image/9slice.png differ diff --git a/media/image/menu.png b/media/image/menu.png index 1a2da60..c209ab6 100644 Binary files a/media/image/menu.png and b/media/image/menu.png differ diff --git a/media/image/portal.png b/media/image/portal.png index fa44f34..5017d32 100644 Binary files a/media/image/portal.png and b/media/image/portal.png differ diff --git a/src/autoload/Pause.tscn b/src/autoload/Pause.tscn index d6a68a3..d402e02 100644 --- a/src/autoload/Pause.tscn +++ b/src/autoload/Pause.tscn @@ -46,9 +46,6 @@ patch_margin_right = 8 patch_margin_bottom = 8 axis_stretch_horizontal = 1 axis_stretch_vertical = 1 -__meta__ = { -"_edit_use_anchors_": false -} [node name="Cursor" type="ColorRect" parent="Center/Menu"] margin_left = 92.0 @@ -65,22 +62,17 @@ margin_left = 87.0 margin_top = 52.0 margin_right = 141.0 margin_bottom = 82.0 -custom_colors/font_color = Color( 1, 0.945098, 0.909804, 1 ) custom_fonts/font = ExtResource( 1 ) text = "resume reset exit" align = 1 -__meta__ = { -"_edit_use_anchors_": false -} [node name="Header" type="Label" parent="Center/Menu"] margin_left = 88.0 margin_top = 35.0 margin_right = 140.0 margin_bottom = 50.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 = SubResource( 1 ) diff --git a/src/autoload/UI.tscn b/src/autoload/UI.tscn index 38f0248..18278dc 100644 --- a/src/autoload/UI.tscn +++ b/src/autoload/UI.tscn @@ -10,7 +10,7 @@ [sub_resource type="DynamicFont" id=4] outline_size = 1 outline_color = Color( 0, 0, 0, 1 ) -extra_spacing_bottom = -1 +extra_spacing_bottom = -4 font_data = ExtResource( 8 ) [sub_resource type="DynamicFont" id=3] @@ -46,53 +46,57 @@ rect_min_size = Vector2( 228, 128 ) [node name="List" type="HBoxContainer" parent="Center/Control"] margin_left = 5.0 -margin_top = 110.0 +margin_top = 111.0 margin_right = 223.0 -margin_bottom = 125.0 +margin_bottom = 123.0 custom_constants/separation = 0 [node name="X" type="HBoxContainer" parent="Center/Control/List"] -margin_right = 48.0 -margin_bottom = 15.0 +margin_right = 51.0 +margin_bottom = 12.0 custom_constants/separation = 2 [node name="Key" type="Label" parent="Center/Control/List/X"] -margin_right = 10.0 -margin_bottom = 15.0 +modulate = Color( 1, 0, 0.301961, 1 ) +margin_right = 13.0 +margin_bottom = 12.0 custom_fonts/font = SubResource( 4 ) text = "x" +uppercase = true [node name="Desc" type="Label" parent="Center/Control/List/X"] -margin_left = 12.0 -margin_top = 4.0 -margin_right = 48.0 -margin_bottom = 10.0 +margin_left = 15.0 +margin_top = 3.0 +margin_right = 51.0 +margin_bottom = 9.0 custom_fonts/font = SubResource( 3 ) text = "select" [node name="Spacer" type="Control" parent="Center/Control/List"] -margin_left = 48.0 -margin_right = 52.0 -margin_bottom = 15.0 +margin_left = 51.0 +margin_right = 55.0 +margin_bottom = 12.0 rect_min_size = Vector2( 4, 0 ) [node name="C" type="HBoxContainer" parent="Center/Control/List"] -margin_left = 52.0 -margin_right = 91.0 -margin_bottom = 15.0 +margin_left = 55.0 +margin_right = 94.0 +margin_bottom = 12.0 custom_constants/separation = 2 [node name="Key" type="Label" parent="Center/Control/List/C"] +modulate = Color( 1, 0, 0.301961, 1 ) margin_right = 13.0 -margin_bottom = 15.0 +margin_bottom = 12.0 custom_fonts/font = SubResource( 4 ) -text = "C" +text = "c" +uppercase = true [node name="Desc" type="Label" parent="Center/Control/List/C"] margin_left = 15.0 -margin_top = 4.0 +margin_top = 3.0 margin_right = 39.0 -margin_bottom = 10.0 +margin_bottom = 9.0 custom_fonts/font = SubResource( 3 ) text = "back" diff --git a/src/menu/StartMenu.gd b/src/menu/StartMenu.gd index c5ca155..43b5192 100644 --- a/src/menu/StartMenu.gd +++ b/src/menu/StartMenu.gd @@ -3,8 +3,10 @@ extends Node2D 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", "quit"] +var main_items := ["play", "options", "credits"] onready var quit_menu : Control = $Menu/Quit onready var quit_list : Label = $Menu/Quit/List @@ -50,15 +52,8 @@ func _input(event): node_audio_scroll.play() func write_menu(): - menu_list.text = "" - for i in menu_items.size(): - if cursor == i: - menu_list.text += "-" + menu_items[i] + "-" + "\n" - node_cursor.rect_position.y = -1 + i * 11 - node_cursor.rect_position.x = 0 - node_cursor.rect_size.x = menu_list.rect_size.x - 1 - else: - menu_list.text += menu_items[i] + "\n" + for i in 3: + menu_stuff[i].modulate = Color("ff004d") if i == cursor else Color("83769c") func menu_select(): match menu_items[cursor].to_lower(): diff --git a/src/menu/StartMenu.tscn b/src/menu/StartMenu.tscn index 58d0614..31e561b 100644 --- a/src/menu/StartMenu.tscn +++ b/src/menu/StartMenu.tscn @@ -26,6 +26,8 @@ [ext_resource path="res://media/font/QuinqueFive.ttf" type="DynamicFontData" id=24] [sub_resource type="DynamicFont" id=3] +extra_spacing_top = -3 +extra_spacing_bottom = -3 font_data = ExtResource( 6 ) [sub_resource type="DynamicFont" id=4] @@ -143,46 +145,51 @@ margin_left = 2.0 margin_top = 32.0 margin_right = 66.0 margin_bottom = 104.0 +custom_constants/separation = 9 alignment = 1 [node name="Item" type="HBoxContainer" parent="Control/Menu"] -margin_top = 11.0 +margin_top = 9.0 margin_right = 64.0 -margin_bottom = 25.0 +margin_bottom = 21.0 rect_min_size = Vector2( 0, 12 ) +custom_constants/separation = 2 [node name="Image" type="Control" parent="Control/Menu/Item"] margin_right = 8.0 -margin_bottom = 14.0 +margin_bottom = 12.0 rect_min_size = Vector2( 8, 8 ) [node name="Sprite" type="Sprite" parent="Control/Menu/Item/Image"] -position = Vector2( 0, 4 ) +position = Vector2( 0, 2 ) texture = ExtResource( 16 ) centered = false hframes = 4 vframes = 4 [node name="Label" type="Label" parent="Control/Menu/Item"] -margin_left = 12.0 -margin_right = 39.0 -margin_bottom = 14.0 +margin_left = 10.0 +margin_top = 2.0 +margin_right = 43.0 +margin_bottom = 10.0 custom_fonts/font = SubResource( 3 ) text = "play" +uppercase = true [node name="Item2" type="HBoxContainer" parent="Control/Menu"] -margin_top = 29.0 +margin_top = 30.0 margin_right = 64.0 -margin_bottom = 43.0 +margin_bottom = 42.0 rect_min_size = Vector2( 0, 12 ) +custom_constants/separation = 2 [node name="Image" type="Control" parent="Control/Menu/Item2"] margin_right = 8.0 -margin_bottom = 14.0 +margin_bottom = 12.0 rect_min_size = Vector2( 8, 8 ) [node name="Sprite" type="Sprite" parent="Control/Menu/Item2/Image"] -position = Vector2( 0, 4 ) +position = Vector2( 0, 2 ) texture = ExtResource( 16 ) centered = false hframes = 4 @@ -190,25 +197,28 @@ vframes = 4 frame = 1 [node name="Label" type="Label" parent="Control/Menu/Item2"] -margin_left = 12.0 +margin_left = 10.0 +margin_top = 2.0 margin_right = 58.0 -margin_bottom = 14.0 +margin_bottom = 10.0 custom_fonts/font = SubResource( 3 ) -text = "options" +text = "option" +uppercase = true [node name="Item3" type="HBoxContainer" parent="Control/Menu"] -margin_top = 47.0 +margin_top = 51.0 margin_right = 64.0 -margin_bottom = 61.0 +margin_bottom = 63.0 rect_min_size = Vector2( 0, 12 ) +custom_constants/separation = 2 [node name="Image" type="Control" parent="Control/Menu/Item3"] margin_right = 8.0 -margin_bottom = 14.0 +margin_bottom = 12.0 rect_min_size = Vector2( 8, 8 ) [node name="Sprite" type="Sprite" parent="Control/Menu/Item3/Image"] -position = Vector2( 0, 4 ) +position = Vector2( 0, 2 ) texture = ExtResource( 16 ) centered = false hframes = 4 @@ -216,11 +226,13 @@ vframes = 4 frame = 2 [node name="Label" type="Label" parent="Control/Menu/Item3"] -margin_left = 12.0 +margin_left = 10.0 +margin_top = 2.0 margin_right = 58.0 -margin_bottom = 14.0 +margin_bottom = 10.0 custom_fonts/font = SubResource( 3 ) -text = "credits" +text = "credit" +uppercase = true [node name="Header" type="Label" parent="Control"] margin_top = 5.0 @@ -232,6 +244,7 @@ text = "Tiny Crate" align = 1 [node name="Logo" type="TextureRect" parent="Control"] +modulate = Color( 0, 0.529412, 0.317647, 1 ) margin_left = 115.0 margin_top = 95.0 margin_right = 192.0 @@ -239,6 +252,7 @@ margin_bottom = 123.0 texture = ExtResource( 4 ) [node name="Website" type="Label" parent="Control"] +modulate = Color( 0.160784, 0.678431, 1, 1 ) margin_left = 158.0 margin_top = 112.0 margin_right = 227.0 @@ -284,7 +298,7 @@ tile_data = PoolIntArray( 393222, 0, 0, 393223, 0, 1, 393224, 0, 0, 393225, 0, 1 [node name="DetailTileMap" parent="Stage" instance=ExtResource( 8 )] z_index = -11 -tile_data = PoolIntArray( 131093, 536870916, 3, 131094, 4, 1, 131095, 4, 0, 131096, 4, 3, 196624, 5, 2, 196625, 5, 0, 196626, -1610612731, 2, 196630, 536870916, 0, 196631, 4, 1, 196632, 4, 0, 262154, 536870916, 3, 262155, 536870916, 0, 262156, 4, 3, 262159, 5, 2, 262160, 5, 0, 262161, 5, 0, 262162, 5, 0, 262163, -1610612731, 2, 262166, 4, 1, 262167, 4, 0, 262168, 4, 1, 327685, 5, 2, 327686, 5, 0, 327687, 5, 0, 327688, 5, 0, 327689, 536870917, 2, 327690, 536870916, 0, 327691, 4, 1, 327692, 4, 0, 327695, -1610612731, 0, 327696, 5, 0, 327697, 5, 0, 327698, 5, 0, 327699, -1073741819, 0, 327701, 536870916, 3, 327702, 4, 0, 327703, 4, 1, 327704, 536870916, 2, 393221, -1073741819, 0, 393227, 4, 1, 393228, 4, 0, 393229, 4, 3, 393231, -1073741819, 2, 393232, 5, 0, 393233, 5, 0, 393234, 5, 0, 393235, -536870907, 2, 393237, 536870916, 0, 393238, 4, 1, 393239, 536870916, 0, 458757, -1073741819, 2, 458759, -1610612731, 2, 458762, 4, 1, 458763, 536870916, 0, 458764, 4, 1, 458765, 4, 0, 458768, -1073741819, 2, 458769, 5, 0, 458770, 1610612741, 2, 458773, 4, 2, 458774, 4, 0, 458775, 4, 1, 458776, 4, 3, 524295, -1610612731, 0, 524298, 4, 2, 524299, 4, 1, 524300, 536870916, 0, 524301, 4, 1, 524302, 4, 3, 524305, 5, 1, 524310, 4, 2, 524311, 536870916, 0, 524312, 536870916, 2, 589831, -1073741819, 1, 589832, -1610612731, 0, 589836, 4, 2, 589837, 4, 1, 589838, 4, 0, 589839, 4, 3, 589841, 5, 1, 589842, -536870907, 2, 655367, -1610612731, 0, 655373, 536870916, 3, 655374, 4, 1, 655375, 536870916, 0, 655377, 5, 1, 720901, -2147483643, 2, 720903, -536870907, 2, 720905, 5, 2, 720906, 5, 0, 720907, 5, 0, 720908, 536870917, 2, 720909, 536870916, 3, 720910, 536870916, 0, 720911, 536870916, 2, 720912, 5, 2, 720913, 5, 1, 720914, 5, 0, 720915, 536870917, 2, 720917, 5, 2, 720918, 5, 0, 720919, 536870917, 2, 786437, -2147483643, 0, 786441, -1073741819, 0, 786455, -1610612731, 0, 851973, -1073741819, 2, 851974, 1610612741, 2, 851977, 1073741829, 2, 851978, 5, 0, 851979, 1610612741, 2, 851981, 536870916, 3, 851982, 4, 1, 851983, 4, 0, 851987, 1073741829, 2, 851988, 5, 0, 851989, 5, 1, 851990, 5, 0, 851991, -536870907, 2, 917517, 536870916, 0, 917518, 4, 1, 917519, 536870916, 2, 917525, 1610612741, 2, 983053, 4, 2, 983054, 4, 0, 983055, 536870916, 2 ) +tile_data = PoolIntArray( 131093, 536870916, 3, 131094, 4, 1, 131095, 4, 0, 131096, 4, 3, 196624, 5, 2, 196625, 5, 0, 196626, -1610612731, 2, 196630, 536870916, 0, 196631, 4, 1, 196632, 4, 0, 262154, 536870916, 3, 262155, 536870916, 0, 262156, 4, 3, 262159, 5, 2, 262160, 5, 0, 262161, 5, 0, 262162, 5, 0, 262163, -1610612731, 2, 262166, 4, 1, 262167, 4, 0, 262168, 4, 1, 327685, 5, 2, 327686, 5, 0, 327687, 5, 0, 327688, 5, 0, 327689, 536870917, 2, 327690, 536870916, 0, 327691, 4, 1, 327692, 4, 0, 327695, -1610612731, 0, 327696, 5, 0, 327697, 5, 0, 327698, 5, 0, 327699, -1073741819, 0, 327701, 536870916, 3, 327702, 4, 0, 327703, 4, 1, 327704, 536870916, 2, 393221, -1073741819, 0, 393227, 4, 1, 393228, 4, 0, 393229, 4, 3, 393231, -1073741819, 2, 393232, 5, 0, 393233, 5, 0, 393234, 5, 0, 393235, -536870907, 2, 393237, 536870916, 0, 393238, 4, 1, 393239, 536870916, 0, 458757, -1073741819, 2, 458759, -1610612731, 2, 458762, 4, 1, 458763, 536870916, 0, 458764, 4, 1, 458765, 4, 0, 458768, -1073741819, 2, 458769, 5, 0, 458770, 1610612741, 2, 458773, 4, 2, 458774, 4, 0, 458775, 4, 1, 458776, 4, 3, 524295, -1610612731, 0, 524298, 4, 2, 524299, 4, 1, 524300, 536870916, 0, 524301, 4, 1, 524302, 4, 3, 524305, 5, 1, 524310, 4, 2, 524311, 536870916, 0, 524312, 536870916, 2, 589831, -1073741819, 1, 589832, -1610612731, 0, 589836, 4, 2, 589837, 4, 1, 589838, 4, 0, 589839, 4, 3, 589841, 5, 1, 589842, -536870907, 2, 655367, -1610612731, 0, 655373, 536870916, 3, 655374, 4, 1, 655375, 536870916, 0, 655377, 5, 1, 720901, -2147483643, 2, 720903, -536870907, 2, 720905, 5, 2, 720906, 5, 0, 720907, 5, 0, 720908, 536870917, 2, 720909, 536870916, 3, 720910, 536870916, 0, 720911, 536870916, 2, 720912, 5, 2, 720913, 5, 1, 720914, 5, 0, 720915, 536870917, 2, 720917, 5, 2, 720918, 5, 0, 720919, 536870917, 2, 786437, -2147483643, 0, 786441, -1073741819, 0, 786455, -1610612731, 0, 851973, -1073741819, 2, 851974, 1610612741, 2, 851977, 1073741829, 2, 851978, 5, 0, 851979, 1610612741, 2, 851982, 4, 1, 851983, 4, 0, 851987, 1073741829, 2, 851988, 5, 0, 851989, 5, 1, 851990, 5, 0, 851991, -536870907, 2, 917517, 536870916, 0, 917518, 4, 1, 917519, 536870916, 2, 917525, 1610612741, 2, 983053, 4, 2, 983054, 4, 0, 983055, 536870916, 2 ) [node name="GameCamera" parent="Stage" instance=ExtResource( 13 )] position = Vector2( 90, 76 ) diff --git a/src/menu/select.gd b/src/menu/select.gd index 1394d20..c6c6d8f 100644 --- a/src/menu/select.gd +++ b/src/menu/select.gd @@ -1,6 +1,7 @@ extends Node2D onready var cam : Camera2D = $Camera2D +onready var cursor_node := $Cursor var cursor = 0 @@ -71,7 +72,9 @@ func view_scene(port, path): func scroll(arg = 0): cursor = clamp(cursor + arg, 0, screens.get_child_count() - 1) - cam.position = screens.get_children()[cursor].rect_position + Vector2(50, 50) + var pos = screens.get_children()[cursor].rect_position + Vector2(50, 50) + cam.position = pos + cursor_node.position = pos func open_map(): if cursor <= Shared.map_save: diff --git a/src/menu/select.tscn b/src/menu/select.tscn index 50cbd45..4288086 100644 --- a/src/menu/select.tscn +++ b/src/menu/select.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=13 format=2] [ext_resource path="res://media/image/corner.png" type="Texture" id=1] -[ext_resource path="res://media/font/m3x6.ttf" type="DynamicFontData" id=2] +[ext_resource path="res://media/font/QuinqueFive.ttf" type="DynamicFontData" id=2] [ext_resource path="res://media/image/note.png" type="Texture" id=3] [ext_resource path="res://src/menu/Vis.gd" type="Script" id=4] [ext_resource path="res://media/audio/sfx/Randomize103.wav" type="AudioStream" id=5] @@ -11,9 +11,12 @@ [ext_resource path="res://media/audio/sfx/portal7.wav" type="AudioStream" id=9] [sub_resource type="DynamicFont" id=4] +size = 5 outline_size = 1 outline_color = Color( 0, 0, 0, 1 ) -extra_spacing_top = -5 +extra_spacing_top = -1 +extra_spacing_bottom = -1 +extra_spacing_char = 1 font_data = ExtResource( 2 ) [sub_resource type="ShaderMaterial" id=3] @@ -130,26 +133,13 @@ margin_right = 100.0 margin_bottom = 100.0 [node name="Label" type="Label" parent="Control/Screen/Overlay"] -margin_top = 46.0 +margin_top = 47.0 margin_right = 100.0 -margin_bottom = 54.0 +margin_bottom = 52.0 grow_horizontal = 2 custom_fonts/font = SubResource( 4 ) text = "1-1" align = 1 -valign = 1 - -[node name="ColorRect" type="ColorRect" parent="Control/Screen/Overlay/Label"] -visible = false -show_behind_parent = true -margin_left = 43.0 -margin_top = -1.0 -margin_right = 56.0 -margin_bottom = 7.0 -color = Color( 0, 0, 0, 1 ) -__meta__ = { -"_edit_use_anchors_": false -} [node name="Note" type="Sprite" parent="Control/Screen/Overlay"] material = SubResource( 3 ) @@ -162,29 +152,30 @@ current = true smoothing_enabled = true editor_draw_screen = false -[node name="Cursor" type="Node2D" parent="Camera2D"] +[node name="Cursor" type="Node2D" parent="."] modulate = Color( 1, 0.92549, 0.152941, 1 ) +position = Vector2( 160, 90 ) -[node name="AnimationPlayer" type="AnimationPlayer" parent="Camera2D/Cursor"] +[node name="AnimationPlayer" type="AnimationPlayer" parent="Cursor"] autoplay = "New Anim" "anims/New Anim" = SubResource( 1 ) -[node name="c1" type="Sprite" parent="Camera2D/Cursor"] -position = Vector2( -55, -55 ) +[node name="c1" type="Sprite" parent="Cursor"] +position = Vector2( -45, -45 ) texture = ExtResource( 1 ) -[node name="c2" type="Sprite" parent="Camera2D/Cursor"] -position = Vector2( 55, -55 ) +[node name="c2" type="Sprite" parent="Cursor"] +position = Vector2( 45, -45 ) rotation = 1.5708 texture = ExtResource( 1 ) -[node name="c3" type="Sprite" parent="Camera2D/Cursor"] -position = Vector2( -55, 55 ) +[node name="c3" type="Sprite" parent="Cursor"] +position = Vector2( -45, 45 ) rotation = 4.71239 texture = ExtResource( 1 ) -[node name="c4" type="Sprite" parent="Camera2D/Cursor"] -position = Vector2( 55, 55 ) +[node name="c4" type="Sprite" parent="Cursor"] +position = Vector2( 45, 45 ) rotation = 3.14159 texture = ExtResource( 1 )