diff --git a/assets/ui/fonts/kenny_thick.tres b/assets/ui/fonts/kenny_thick.tres index f604a53..1c1ccc6 100644 --- a/assets/ui/fonts/kenny_thick.tres +++ b/assets/ui/fonts/kenny_thick.tres @@ -1,8 +1,8 @@ [gd_resource type="DynamicFont" load_steps=2 format=2] -[sub_resource type="DynamicFontData" id=1] +[sub_resource type="DynamicFontData" id=12] font_path = "res://assets/ui/fonts/Kenney Thick.ttf" [resource] size = 8 -font_data = SubResource( 1 ) +font_data = SubResource( 12 ) diff --git a/src/Levels/1 Tutorial Level.tscn b/src/Levels/1 Tutorial Level.tscn index 858d0a5..123580e 100644 --- a/src/Levels/1 Tutorial Level.tscn +++ b/src/Levels/1 Tutorial Level.tscn @@ -33,9 +33,6 @@ unique_name_in_owner = true [node name="UserInterface" parent="." instance=ExtResource( 5 )] unique_name_in_owner = true -[node name="HUD" parent="UserInterface" index="0"] -visible = false - [node name="Timer" parent="UserInterface/HUD/HUDOverlay/GetBackTimer" index="0"] wait_time = 20.0 @@ -44,11 +41,8 @@ physics_interpolation_mode = 2 unique_name_in_owner = true process_mode = 1 -[node name="AnimatedSprite" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="4"] -frame = 1 - [node name="AnimatedSprite2" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="5"] -frame = 0 +frame = 3 [node name="Blobby" parent="." instance=ExtResource( 7 )] unique_name_in_owner = true diff --git a/src/Levels/2 Tutorial Level.tscn b/src/Levels/2 Tutorial Level.tscn index d5ce42d..657f4cb 100644 --- a/src/Levels/2 Tutorial Level.tscn +++ b/src/Levels/2 Tutorial Level.tscn @@ -61,9 +61,6 @@ wait_time = 20.0 unique_name_in_owner = true [node name="AnimatedSprite" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="4"] -frame = 11 - -[node name="AnimatedSprite2" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="5"] frame = 10 [node name="Blobby" parent="." instance=ExtResource( 8 )] @@ -87,7 +84,7 @@ collision_layer = 8 collision_mask = 8 bake_navigation = true format = 1 -tile_data = PoolIntArray( -720912, 5, 524293, -655376, 5, 524293, -589840, 5, 524293, -589835, 1610612741, 196609, -589834, 5, 196613, -589833, -1073741819, 196609, -589829, 1610612741, 6, -655291, 5, 6, -655289, 5, 524293, -524304, 5, 524293, -524299, -1073741819, 196616, -524298, 5, 393221, -524297, -1073741819, 196610, -524293, 1610612741, 6, -589755, 5, 6, -589753, 5, 524293, -458768, 5, 524293, -458763, -1610612731, 196609, -458762, 5, 196610, -458761, 5, 196609, -458758, -1073741819, 262150, -458757, 1610612741, 6, -524219, 5, 6, -524217, 5, 524293, -393232, 5, 524293, -393230, 1610612741, 65539, -393229, 1610612741, 3, -393228, 1610612741, 3, -393227, 1610612741, 3, -393226, 1610612741, 3, -393225, 1610612741, 3, -393224, 1610612741, 3, -393223, 1073741829, 2, -393222, 5, 65541, -393221, 1610612741, 6, -458683, 5, 6, -458681, 5, 524293, -327696, 5, 524293, -327694, 5, 7, -327686, 5, 6, -327685, 5, 8, -393147, 5, 6, -393145, 5, 524293, -262160, 5, 524293, -262158, 5, 7, -262150, 5, 6, -262149, 5, 8, -327611, 5, 6, -327609, 5, 524293, -196624, 5, 524293, -196622, 5, 7, -196614, 5, 6, -196613, 5, 8, -262130, 5, 1, -262129, 5, 4, -262125, 5, 1, -262124, 5, 3, -262123, 5, 3, -262122, 5, 4, -262075, 5, 6, -262073, 5, 524293, -131088, 5, 524293, -131086, 5, 7, -131078, 5, 6, -131077, 5, 65538, -131076, 5, 4, -131073, 5, 1, -196608, 5, 3, -196607, 5, 4, -196595, 5, 1, -196594, 5, 65539, -196593, 5, 7, -196589, 5, 6, -196586, 5, 7, -196539, 5, 6, -196537, 5, 524293, -65552, 5, 524293, -65550, 5, 7, -65542, 5, 9, -65541, 5, 65541, -65540, 5, 7, -65537, 1610612741, 8, -131072, 5, 196614, -131071, 5, 7, -131060, 5, 1, -131059, 5, 65539, -131058, -1073741819, 65545, -131057, 5, 7, -131053, 5, 6, -131050, 5, 7, -131003, 5, 6, -131001, 5, 524293, -16, 5, 524293, -14, 5, 7, -5, 5, 6, -4, 5, 8, -1, 1610612741, 8, -65536, 5, 196614, -65535, 5, 7, -65528, 5, 1, -65527, 5, 2, -65526, 5, 2, -65525, 5, 2, -65524, 5, 65539, -65523, 5, 196612, -65522, -1073741819, 65545, -65521, 5, 7, -65517, 5, 6, -65514, 5, 7, -65467, 5, 6, -65465, 5, 524293, 65520, 5, 524293, 65522, 5, 7, 65531, 5, 6, 65532, 5, 65538, 65533, 5, 2, 65534, 5, 2, 65535, 5, 65539, 0, 5, 196614, 1, 5, 7, 8, 5, 9, 9, 5, 10, 10, 5, 10, 11, 5, 65541, 12, -1073741819, 131074, 13, 5, 196612, 14, 1610612741, 196612, 15, 5, 65538, 16, 5, 3, 17, 5, 3, 18, 5, 3, 19, 5, 65539, 22, 5, 7, 69, 5, 6, 71, 5, 524293, 131056, 5, 524293, 131058, 5, 7, 131067, 5, 9, 131068, 5, 10, 131069, 5, 10, 131070, 5, 10, 131071, 5, 10, 65536, 5, 65541, 65537, 5, 7, 65539, 5, 65542, 65540, 5, 65544, 65547, 5, 6, 65558, 5, 7, 65564, 5, 1, 65565, 5, 2, 65566, 5, 2, 65567, 5, 5, 65605, 5, 6, 65607, 5, 524293, 196592, 5, 524293, 196594, 5, 7, 131072, 5, 9, 131073, 5, 65536, 131083, 5, 6, 131094, 5, 7, 131100, 5, 6, 131103, 5, 7, 131108, 5, 65542, 131109, 5, 65543, 131110, 5, 65543, 131111, 5, 65544, 131116, 5, 1, 131117, 5, 2, 131118, 5, 2, 131119, 5, 2, 131120, 5, 2, 131121, 5, 2, 131122, 5, 2, 131123, 5, 2, 131124, 5, 2, 131125, 5, 2, 131126, 5, 2, 131127, 5, 2, 131128, 5, 2, 131129, 5, 2, 131130, 5, 2, 131131, 5, 2, 131132, 5, 2, 131133, 5, 2, 131134, 5, 2, 131135, 5, 2, 131136, 5, 2, 131137, 5, 2, 131138, 5, 2, 131139, 5, 2, 131140, 5, 2, 131141, 5, 65539, 131143, 5, 524293, 262128, 5, 524293, 262130, 5, 7, 196619, 5, 6, 196630, 5, 7, 196636, 5, 6, 196639, 5, 7, 196652, 5, 6, 196679, 5, 524293, 327664, 5, 524293, 327666, 5, 7, 262150, 5, 1, 262151, 5, 2, 262152, 5, 2, 262153, 5, 2, 262154, 5, 2, 262155, 5, 65539, 262166, 5, 7, 262172, 5, 6, 262173, 5, 327687, 262175, 5, 7, 262188, 5, 6, 262215, 5, 524293, 393200, 5, 524293, 393202, 5, 7, 327686, 5, 6, 327702, 5, 7, 327708, 5, 6, 327711, 5, 7, 327724, 5, 6, 327751, 5, 524293, 458736, 5, 524293, 458738, 5, 7, 393222, 5, 6, 393238, 5, 7, 393244, 5, 6, 393247, 5, 7, 393260, 5, 6, 393287, 5, 524293, 524272, 5, 524293, 524274, 5, 65538, 524275, 5, 2, 524276, 5, 2, 524277, 5, 2, 524278, 5, 2, 524279, 536870917, 2, 524280, 536870917, 2, 524281, 536870917, 2, 524282, 536870917, 2, 524283, 536870917, 2, 524284, 536870917, 2, 524285, 536870917, 2, 524286, 536870917, 2, 524287, 536870917, 2, 458752, 536870917, 2, 458753, 5, 3, 458754, 5, 3, 458755, 5, 3, 458756, 5, 3, 458757, 5, 3, 458758, 5, 65539, 458774, 5, 7, 458780, 5, 6, 458783, 5, 65538, 458784, 5, 2, 458785, 5, 2, 458786, 5, 2, 458787, 5, 2, 458788, 5, 2, 458789, 5, 2, 458790, 5, 2, 458791, 5, 2, 458792, 5, 2, 458793, 5, 2, 458794, 5, 2, 458795, 5, 2, 458796, 5, 65539, 458823, 5, 524293, 589808, 5, 524293, 524310, 5, 8, 524316, 5, 6, 524359, 5, 524293, 655344, 5, 524293, 655345, 5, 524293, 655346, 5, 524293, 655347, 5, 524293, 655348, 5, 524293, 655349, 5, 524293, 655350, 5, 524293, 655351, 5, 524293, 655352, 5, 524293, 655353, 5, 524293, 655354, 5, 524293, 655355, 5, 524293, 655356, 5, 524293, 655357, 5, 524293, 655358, 5, 524293, 655359, 5, 524293, 589824, 5, 524293, 589825, 5, 524293, 589826, 5, 524293, 589827, 5, 524293, 589828, 5, 524293, 589829, 5, 524293, 589830, 5, 524293, 589831, 5, 524293, 589832, 5, 524293, 589833, 5, 524293, 589834, 5, 524293, 589835, 5, 524293, 589836, 5, 524293, 589837, 5, 524293, 589838, 5, 524293, 589839, 5, 524293, 589840, 5, 524293, 589841, 5, 524293, 589842, 5, 524293, 589843, 5, 524293, 589844, 5, 524293, 589845, 5, 524293, 589846, 5, 8, 589852, 5, 6, 589853, 5, 524293, 589854, 5, 524293, 589855, 5, 524293, 589856, 5, 524293, 589857, 5, 524293, 589858, 5, 524293, 589859, 5, 524293, 589860, 5, 524293, 589861, 5, 524293, 589862, 5, 524293, 589863, 5, 524293, 589864, 5, 524293, 589865, 5, 524293, 589866, 5, 524293, 589867, 5, 524293, 589868, 5, 524293, 589869, 5, 524293, 589870, 5, 524293, 589871, 5, 524293, 589872, 5, 524293, 589873, 5, 524293, 589874, 5, 524293, 589875, 5, 524293, 589876, 5, 524293, 589877, 5, 524293, 589878, 5, 524293, 589879, 5, 524293, 589880, 5, 524293, 589881, 5, 524293, 589882, 5, 524293, 589883, 5, 524293, 589884, 5, 524293, 589885, 5, 524293, 589886, 5, 524293, 589887, 5, 524293, 589888, 5, 524293, 589889, 5, 524293, 589890, 5, 524293, 589891, 5, 524293, 589892, 5, 524293, 589893, 5, 524293, 589894, 5, 524293, 589895, 5, 524293 ) +tile_data = PoolIntArray( -720912, 5, 524293, -655376, 5, 524293, -589840, 5, 524293, -589835, 1610612741, 196609, -589834, 5, 196613, -589833, -1073741819, 196609, -589829, 1610612741, 6, -524304, 5, 524293, -524299, -1073741819, 196616, -524298, 5, 393221, -524297, -1073741819, 196610, -524293, 1610612741, 6, -458768, 5, 524293, -458763, -1610612731, 196609, -458762, 5, 196610, -458761, 5, 196609, -458758, -1073741819, 262150, -458757, 1610612741, 6, -393232, 5, 524293, -393230, 1610612741, 65539, -393229, 1610612741, 3, -393228, 1610612741, 3, -393227, 1610612741, 3, -393226, 1610612741, 3, -393225, 1610612741, 3, -393224, 1610612741, 3, -393223, 1073741829, 2, -393222, 5, 65541, -393221, 1610612741, 6, -327696, 5, 524293, -327694, 5, 7, -327686, 5, 6, -327685, 5, 8, -262160, 5, 524293, -262158, 5, 7, -262150, 5, 6, -262149, 5, 8, -196624, 5, 524293, -196622, 5, 7, -196614, 5, 6, -196613, 5, 8, -131088, 5, 524293, -131086, 5, 7, -131078, 5, 6, -131077, 5, 65538, -131076, 5, 2, -131075, 5, 2, -131074, 5, 5, -196606, 5, 1, -196605, 5, 2, -196604, 5, 5, -65552, 5, 524293, -65550, 5, 7, -65542, 5, 6, -65538, 5, 7, -131070, 5, 6, -131068, 5, 7, -16, 5, 524293, -14, 5, 7, -6, 5, 6, -2, 5, 7, -65534, 5, 6, -65532, 5, 7, 65520, 5, 524293, 65522, 5, 7, 65530, 5, 6, 65534, 5, 7, 2, 5, 6, 4, 5, 65538, 5, 5, 2, 6, 5, 2, 7, 5, 5, 131056, 5, 524293, 131058, 5, 7, 131066, 5, 6, 131071, 5, 2, 65536, 5, 2, 65537, 5, 2, 65538, 5, 65540, 65539, 5, 10, 65540, 5, 10, 65541, 5, 10, 65542, 5, 10, 65543, 5, 65536, 196592, 5, 524293, 196594, 5, 7, 196602, 5, 9, 196603, 5, 10, 196604, 5, 10, 196605, 5, 10, 196606, 5, 10, 196607, 5, 10, 131072, 5, 10, 131073, 5, 10, 131074, 5, 65536, 262128, 5, 524293, 262130, 5, 7, 327664, 5, 524293, 327666, 5, 7, 393200, 5, 524293, 393202, 5, 7, 458736, 5, 524293, 458738, 5, 7, 393225, 5, 6, 393226, 5, 6, 393227, 5, 6, 393228, 5, 6, 393229, 5, 6, 393230, 5, 6, 393231, 5, 6, 393232, 5, 6, 393233, 5, 6, 393234, 5, 6, 393235, 5, 6, 393236, 5, 6, 393237, 5, 6, 393238, 5, 6, 393239, 5, 6, 393240, 5, 6, 393241, 5, 6, 393242, 5, 6, 393243, 5, 6, 393244, 5, 6, 393245, 5, 6, 393246, 5, 6, 393247, 5, 6, 393248, 5, 6, 393256, 5, 6, 393257, 5, 6, 393258, 5, 6, 393267, 5, 6, 393268, 5, 6, 393269, 5, 6, 393270, 5, 6, 393271, 5, 6, 393272, 5, 6, 393273, 5, 6, 393283, 5, 6, 393284, 5, 6, 393285, 5, 6, 393286, 5, 6, 393287, 5, 6, 393288, 5, 6, 393289, 5, 6, 393290, 5, 6, 393301, 5, 6, 393302, 5, 6, 393303, 5, 6, 393304, 5, 6, 393305, 5, 6, 393306, 5, 6, 393307, 5, 6, 393319, 5, 6, 393320, 5, 6, 393321, 5, 6, 393322, 5, 6, 393323, 5, 6, 393324, 5, 6, 393325, 5, 6, 524272, 5, 524293, 524274, 5, 65538, 524275, 5, 2, 524276, 5, 2, 524277, 5, 2, 524278, 5, 2, 524279, 536870917, 2, 524280, 536870917, 2, 524281, 536870917, 2, 524282, 536870917, 2, 524283, 536870917, 2, 524284, 536870917, 2, 524285, 5, 2, 524286, 5, 2, 524287, 5, 2, 458752, 5, 2, 458753, 5, 2, 458754, 5, 2, 458755, 5, 2, 458756, 5, 2, 458757, 5, 2, 458758, 5, 2, 458759, 5, 2, 458760, 5, 2, 458761, 5, 2, 458762, 5, 2, 458763, 5, 2, 458764, 5, 2, 458765, 5, 2, 458766, 5, 2, 458767, 5, 2, 458768, 5, 2, 458769, 5, 2, 458770, 5, 2, 458771, 5, 2, 458772, 5, 2, 458773, 5, 2, 458774, 5, 2, 458775, 5, 2, 458776, 5, 2, 458777, 5, 2, 458778, 5, 2, 458779, 5, 2, 458780, 5, 2, 458781, 5, 2, 458782, 5, 2, 458783, 5, 2, 458784, 5, 2, 458785, 5, 2, 458786, 5, 6, 458787, 5, 6, 458788, 5, 6, 458789, 5, 6, 458790, 5, 6, 458791, 5, 6, 458792, 5, 6, 458793, 5, 6, 458794, 5, 6, 458795, 5, 6, 458796, 5, 6, 458797, 5, 6, 458798, 5, 6, 458799, 5, 6, 458800, 5, 6, 458801, 5, 6, 458802, 5, 6, 458803, 5, 6, 458804, 5, 6, 458805, 5, 6, 458806, 5, 6, 458807, 5, 6, 458808, 5, 6, 458809, 5, 6, 458810, 5, 6, 458811, 5, 6, 458812, 5, 6, 458813, 5, 6, 458814, 5, 6, 458815, 5, 6, 458816, 5, 6, 458817, 5, 6, 458818, 5, 6, 458819, 5, 6, 458820, 5, 6, 458821, 5, 6, 458822, 5, 6, 458823, 5, 6, 458824, 5, 6, 458825, 5, 6, 458826, 5, 6, 458827, 5, 6, 458828, 5, 6, 458829, 5, 6, 458830, 5, 6, 458831, 5, 6, 458832, 5, 6, 458833, 5, 6, 458834, 5, 6, 458835, 5, 6, 458836, 5, 6, 458837, 5, 6, 458838, 5, 6, 458839, 5, 6, 458840, 5, 6, 458841, 5, 6, 458842, 5, 6, 458843, 5, 6, 458844, 5, 6, 458845, 5, 6, 458846, 5, 6, 458847, 5, 6, 458848, 5, 6, 458849, 5, 6, 458850, 5, 6, 458851, 5, 6, 458852, 5, 6, 458853, 5, 6, 458854, 5, 6, 458855, 5, 6, 458856, 5, 6, 458857, 5, 6, 458858, 5, 6, 458859, 5, 6, 458860, 5, 6, 458861, 5, 6, 589808, 5, 524293, 655344, 5, 524293, 655345, 5, 524293, 655346, 5, 524293, 655347, 5, 524293, 655348, 5, 524293, 655349, 5, 524293, 655350, 5, 524293, 655351, 5, 524293, 655352, 5, 524293, 655353, 5, 524293, 655354, 5, 524293, 655355, 5, 524293, 655356, 5, 524293 ) [node name="DropThroughPlatforms" type="TileMap" parent="."] tile_set = ExtResource( 4 ) @@ -100,7 +97,7 @@ cell_size = Vector2( 16, 16 ) format = 1 [node name="ElevatorButton" parent="." instance=ExtResource( 12 )] -position = Vector2( 864, 32 ) +position = Vector2( 874, 441 ) [node name="Portal" parent="ElevatorButton" instance=ExtResource( 6 )] position = Vector2( 112, -8 ) @@ -108,6 +105,7 @@ scale = Vector2( 0.5, 0.5 ) next_scene = "res://src/Levels/Actual Level 1.tscn" [node name="Obstacles" type="Node2D" parent="."] +position = Vector2( -254, 254 ) [node name="Spikes" parent="Obstacles" instance=ExtResource( 11 )] position = Vector2( 524, 100 ) diff --git a/src/UserInterface/Screens/InGameMenu/ControlsMenuIngame.gd b/src/UserInterface/Screens/InGameMenu/ControlsMenuIngame.gd index 6b2cb8f..8adb6ea 100644 --- a/src/UserInterface/Screens/InGameMenu/ControlsMenuIngame.gd +++ b/src/UserInterface/Screens/InGameMenu/ControlsMenuIngame.gd @@ -14,12 +14,11 @@ func _ready() -> void: func _input(event: InputEvent) -> void: # TODO Static quit button esc - if !event.is_action("ui_cancel"): + if !event.is_action("ui_cancel") || !self.visible: return if block_ui_cancel: block_ui_cancel = false return - get_tree().set_input_as_handled() $"%Back"._on_button_up() func rebuild(input_profile): diff --git a/src/UserInterface/Screens/InGameMenu/PauseScreen.gd b/src/UserInterface/Screens/InGameMenu/PauseScreen.gd index 8191da4..297ebc4 100644 --- a/src/UserInterface/Screens/InGameMenu/PauseScreen.gd +++ b/src/UserInterface/Screens/InGameMenu/PauseScreen.gd @@ -22,11 +22,10 @@ func _on_GlobalState_player_died() -> void: func _unhandled_input(event: InputEvent) -> void: # TODO don't match for specific text... why did i even consider that... did I pull that from the tutorial??? - if event.is_action_pressed("pause") && pause_title.text != "You lost" && !$ControlsMenu.visible: + if event.is_action_released("pause") && pause_title.text != "You lost" && !$ControlsMenu.visible: #not oder ! schaltet einen boolean um #Ist self hier notwendig? self.paused = not paused - get_tree().set_input_as_handled() func set_paused(value: bool) -> void: diff --git a/src/UserInterface/Screens/InGameMenu/PauseScreen.tscn b/src/UserInterface/Screens/InGameMenu/PauseScreen.tscn index f7e51f8..2ced461 100644 --- a/src/UserInterface/Screens/InGameMenu/PauseScreen.tscn +++ b/src/UserInterface/Screens/InGameMenu/PauseScreen.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=30 format=2] +[gd_scene load_steps=32 format=2] [ext_resource path="res://assets/meta/ui_theme.tres" type="Theme" id=1] [ext_resource path="res://assets/ui/sci-fi-godot-theme/sci-fi-theme.tres" type="Theme" id=2] @@ -32,13 +32,20 @@ shader = ExtResource( 7 ) shader_param/transparency = 0.1 [sub_resource type="DynamicFont" id=10] -size = 10 +size = 9 font_data = ExtResource( 18 ) [sub_resource type="DynamicFont" id=11] -size = 10 +size = 9 font_data = ExtResource( 18 ) +[sub_resource type="DynamicFontData" id=12] +font_path = "res://assets/ui/fonts/Kenney Thick.ttf" + +[sub_resource type="DynamicFont" id=13] +size = 9 +font_data = SubResource( 12 ) + [sub_resource type="ShaderMaterial" id=8] shader = ExtResource( 7 ) shader_param/transparency = 0.778 @@ -146,12 +153,12 @@ grow_vertical = 2 [node name="Headers" type="HBoxContainer" parent="ControlsMenu/Panel/KeymapViewer"] margin_right = 599.0 -margin_bottom = 12.0 +margin_bottom = 11.0 size_flags_horizontal = 3 [node name="Action" type="Label" parent="ControlsMenu/Panel/KeymapViewer/Headers"] -margin_right = 264.0 -margin_bottom = 12.0 +margin_right = 267.0 +margin_bottom = 11.0 grow_horizontal = 2 size_flags_horizontal = 3 size_flags_vertical = 0 @@ -160,9 +167,9 @@ text = "Action" valign = 1 [node name="Control" type="Label" parent="ControlsMenu/Panel/KeymapViewer/Headers"] -margin_left = 268.0 -margin_right = 330.0 -margin_bottom = 12.0 +margin_left = 271.0 +margin_right = 327.0 +margin_bottom = 11.0 grow_horizontal = 2 size_flags_horizontal = 0 size_flags_vertical = 0 @@ -172,19 +179,19 @@ align = 1 valign = 1 [node name="Change" type="Label" parent="ControlsMenu/Panel/KeymapViewer/Headers"] -margin_left = 334.0 +margin_left = 331.0 margin_right = 599.0 -margin_bottom = 9.0 +margin_bottom = 11.0 grow_horizontal = 2 size_flags_horizontal = 3 size_flags_vertical = 0 -custom_fonts/font = ExtResource( 19 ) +custom_fonts/font = SubResource( 13 ) text = "Edit" align = 2 valign = 1 [node name="ScrollContainer" type="ScrollContainer" parent="ControlsMenu/Panel/KeymapViewer"] -margin_top = 16.0 +margin_top = 15.0 margin_right = 599.0 margin_bottom = 229.0 focus_neighbour_top = NodePath("../../ProfilesMenu") @@ -197,7 +204,7 @@ follow_focus = true [node name="ActionKeyList" type="VBoxContainer" parent="ControlsMenu/Panel/KeymapViewer/ScrollContainer"] unique_name_in_owner = true margin_right = 599.0 -margin_bottom = 213.0 +margin_bottom = 214.0 size_flags_horizontal = 3 size_flags_vertical = 3 script = ExtResource( 9 ) @@ -205,12 +212,17 @@ script = ExtResource( 9 ) [node name="Back" type="Button" parent="ControlsMenu/Panel"] unique_name_in_owner = true anchor_left = 0.05 -anchor_top = 0.95 +anchor_top = 0.934 anchor_right = 0.05 anchor_bottom = 0.95 +margin_left = -21.0 +margin_top = -12.0 +margin_right = 55.0 +margin_bottom = 8.0 grow_horizontal = 2 grow_vertical = 2 rect_min_size = Vector2( 40, 20 ) +rect_pivot_offset = Vector2( 1039.7, 245.35 ) focus_neighbour_left = NodePath("../Save") focus_neighbour_top = NodePath("../KeymapViewer/ScrollContainer") focus_neighbour_right = NodePath("../Reset") @@ -234,6 +246,7 @@ margin_bottom = 8.0 grow_horizontal = 2 grow_vertical = 2 rect_min_size = Vector2( 40, 20 ) +rect_pivot_offset = Vector2( 826, -79.65 ) focus_neighbour_left = NodePath("../Back") focus_neighbour_top = NodePath("../KeymapViewer/ScrollContainer") focus_neighbour_right = NodePath("../Save") @@ -250,6 +263,10 @@ anchor_left = 0.95 anchor_top = 0.95 anchor_right = 0.95 anchor_bottom = 0.95 +margin_left = -59.0 +margin_top = -17.0 +margin_right = 16.0 +margin_bottom = 8.0 grow_horizontal = 2 grow_vertical = 2 rect_min_size = Vector2( 40, 20 ) @@ -328,15 +345,15 @@ anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 anchor_bottom = 0.5 -margin_left = -334.0 -margin_top = -26.0 -margin_right = 335.0 -margin_bottom = 26.0 +margin_left = -334.5 +margin_top = -27.5 +margin_right = 334.5 +margin_bottom = 27.5 grow_horizontal = 2 mouse_filter = 0 size_flags_horizontal = 0 size_flags_vertical = 0 -custom_fonts/font = SubResource( 7 ) +custom_fonts/font = ExtResource( 19 ) text = "Unsaved changes were made. Go back anyway?" align = 1 @@ -344,12 +361,13 @@ valign = 1 [node name="VBoxContainer" type="VBoxContainer" parent="ControlsMenu/ReallyQuitMenu"] anchor_left = 0.5 -anchor_top = 0.85 +anchor_top = 1.0 anchor_right = 0.5 -anchor_bottom = 0.85 -margin_left = -50.5 -margin_top = -67.0 -margin_right = 50.5 +anchor_bottom = 1.0 +margin_left = -79.0 +margin_top = -124.0 +margin_right = 79.0 +margin_bottom = -55.0 grow_horizontal = 2 grow_vertical = 2 mouse_filter = 0 @@ -359,8 +377,9 @@ size_flags_vertical = 0 alignment = 1 [node name="SaveNQuit" type="Button" parent="ControlsMenu/ReallyQuitMenu/VBoxContainer"] -margin_right = 156.0 -margin_bottom = 27.0 +unique_name_in_owner = true +margin_right = 158.0 +margin_bottom = 20.0 grow_horizontal = 2 grow_vertical = 2 rect_min_size = Vector2( 40, 20 ) @@ -369,14 +388,16 @@ focus_neighbour_bottom = NodePath("../ContinueEdit") input_pass_on_modal_close_click = false size_flags_horizontal = 7 size_flags_vertical = 4 +custom_fonts/font = ExtResource( 19 ) text = "Save And Quit" icon_align = 1 script = ExtResource( 11 ) [node name="ContinueEdit" type="Button" parent="ControlsMenu/ReallyQuitMenu/VBoxContainer"] -margin_top = 31.0 -margin_right = 156.0 -margin_bottom = 58.0 +unique_name_in_owner = true +margin_top = 24.0 +margin_right = 158.0 +margin_bottom = 45.0 focus_neighbour_left = NodePath(".") focus_neighbour_top = NodePath("../SaveNQuit") focus_neighbour_right = NodePath(".") @@ -386,12 +407,14 @@ focus_previous = NodePath(".") input_pass_on_modal_close_click = false size_flags_horizontal = 7 size_flags_vertical = 7 +custom_fonts/font = ExtResource( 19 ) text = "Continue Editing" [node name="QuitDontSave" type="Button" parent="ControlsMenu/ReallyQuitMenu/VBoxContainer"] -margin_top = 62.0 -margin_right = 156.0 -margin_bottom = 89.0 +unique_name_in_owner = true +margin_top = 49.0 +margin_right = 158.0 +margin_bottom = 69.0 grow_horizontal = 2 grow_vertical = 2 rect_min_size = Vector2( 40, 20 ) @@ -400,6 +423,7 @@ focus_neighbour_bottom = NodePath("../SaveNQuit") input_pass_on_modal_close_click = false size_flags_horizontal = 7 size_flags_vertical = 4 +custom_fonts/font = ExtResource( 19 ) text = "Quit Don't Save" [node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="ControlsMenu"] diff --git a/src/UserInterface/Screens/InGameMenu/SaveAndQuitIngameButton.gd b/src/UserInterface/Screens/InGameMenu/SaveAndQuitIngameButton.gd index 041a8d2..3b96bf2 100644 --- a/src/UserInterface/Screens/InGameMenu/SaveAndQuitIngameButton.gd +++ b/src/UserInterface/Screens/InGameMenu/SaveAndQuitIngameButton.gd @@ -6,13 +6,16 @@ onready var mapper := $"%InputMapper" export(String, FILE) var next_screen_path: = "" func _on_button_up() -> void: - signalManager.connect("savemanager_saved",self,"was_saved_now_quit") - mapper.commit_to_changes() - SaveManager.save_default() + signalManager.connect("savemanager_saved",self,"was_saved_now_quit") + mapper.commit_to_changes() + SaveManager.save_default() func was_saved_now_quit() -> void: - $"%ReallyQuitMenu".close() - $"%ControlsMenu".close() + $"%ReallyQuitMenu".close() + $"%ControlsMenu".changes_made = false + $"%ControlsMenu".changes_saved = true + $"%ControlsMenu".close() + $"%Continue".grab_focus() func _get_configuration_warning() -> String: - return "next_scene_path must be set for the button to work" if next_screen_path == "" else "" + return "next_scene_path must be set for the button to work" if next_screen_path == "" else "" diff --git a/src/UserInterface/Screens/InGameMenu/SavedCheckBackIngameButton.gd b/src/UserInterface/Screens/InGameMenu/SavedCheckBackIngameButton.gd index b7eae87..2648e99 100644 --- a/src/UserInterface/Screens/InGameMenu/SavedCheckBackIngameButton.gd +++ b/src/UserInterface/Screens/InGameMenu/SavedCheckBackIngameButton.gd @@ -3,6 +3,7 @@ extends Button func _on_button_up() -> void: if(!$"../..".changes_made || $"../..".changes_saved): $"%ControlsMenu".close() + get_tree().set_input_as_handled() else: set_process_input(false) $"%ReallyQuitMenu".open() diff --git a/src/UserInterface/Screens/MainMenu/ControlsMenu/ControlsMenu.gd b/src/UserInterface/Screens/MainMenu/ControlsMenu/ControlsMenu.gd index 8cc049e..57272ac 100644 --- a/src/UserInterface/Screens/MainMenu/ControlsMenu/ControlsMenu.gd +++ b/src/UserInterface/Screens/MainMenu/ControlsMenu/ControlsMenu.gd @@ -15,12 +15,11 @@ func _ready(): func _input(event: InputEvent) -> void: # TODO Static quit button esc - if !event.is_action("ui_cancel"): + if !event.is_action("ui_cancel") || !visible: return if block_ui_cancel: block_ui_cancel = false return - get_tree().set_input_as_handled() $"%Back"._on_button_up() func rebuild(input_profile): diff --git a/src/UserInterface/Screens/MainMenu/ControlsMenu/ControlsMenu.tscn b/src/UserInterface/Screens/MainMenu/ControlsMenu/ControlsMenu.tscn index 1e9469a..2ae18ca 100644 --- a/src/UserInterface/Screens/MainMenu/ControlsMenu/ControlsMenu.tscn +++ b/src/UserInterface/Screens/MainMenu/ControlsMenu/ControlsMenu.tscn @@ -336,16 +336,7 @@ focus_mode = 2 input_pass_on_modal_close_click = false script = ExtResource( 6 ) -[node name="Panel" type="Panel" parent="ReallyQuitMenu"] -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -margin_left = -78.0 -margin_right = 78.0 -theme = ExtResource( 20 ) - -[node name="Prompt" type="Label" parent="ReallyQuitMenu/Panel"] +[node name="Prompt" type="Label" parent="ReallyQuitMenu"] anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 @@ -364,13 +355,13 @@ text = "Unsaved changes were made. align = 1 valign = 1 -[node name="VBoxContainer" type="VBoxContainer" parent="ReallyQuitMenu/Panel"] +[node name="VBoxContainer" type="VBoxContainer" parent="ReallyQuitMenu"] anchor_left = 0.5 anchor_right = 0.5 margin_left = -78.0 -margin_top = 81.0 +margin_top = 228.0 margin_right = 78.0 -margin_bottom = 82.0 +margin_bottom = 295.0 grow_horizontal = 2 grow_vertical = 2 mouse_filter = 0 @@ -379,7 +370,7 @@ size_flags_horizontal = 0 size_flags_vertical = 0 alignment = 1 -[node name="SaveNQuit" type="Button" parent="ReallyQuitMenu/Panel/VBoxContainer"] +[node name="SaveNQuit" type="Button" parent="ReallyQuitMenu/VBoxContainer"] unique_name_in_owner = true margin_right = 156.0 margin_bottom = 20.0 @@ -397,7 +388,7 @@ icon_align = 1 script = ExtResource( 4 ) next_screen_path = "res://src/UserInterface/Screens/MainMenu/MainScreen.tscn" -[node name="ContinueEdit" type="Button" parent="ReallyQuitMenu/Panel/VBoxContainer"] +[node name="ContinueEdit" type="Button" parent="ReallyQuitMenu/VBoxContainer"] unique_name_in_owner = true margin_top = 24.0 margin_right = 156.0 @@ -414,7 +405,7 @@ input_pass_on_modal_close_click = false size_flags_vertical = 5 text = "Continue Editing" -[node name="QuitDontSave" type="Button" parent="ReallyQuitMenu/Panel/VBoxContainer"] +[node name="QuitDontSave" type="Button" parent="ReallyQuitMenu/VBoxContainer"] unique_name_in_owner = true margin_top = 47.0 margin_right = 156.0 @@ -442,6 +433,6 @@ bus = "Music" [connection signal="button_up" from="Panel/Save" to="Panel/Save" method="_on_button_up"] [connection signal="focus_entered" from="Panel/KeymapViewer/ScrollContainer" to="Panel/KeymapViewer/ScrollContainer" method="_on_focus_entered"] [connection signal="timeout" from="KeySelectMenu/Timer" to="KeySelectMenu" method="close_on_timeout"] -[connection signal="button_up" from="ReallyQuitMenu/Panel/VBoxContainer/SaveNQuit" to="ReallyQuitMenu/Panel/VBoxContainer/SaveNQuit" method="_on_button_up"] -[connection signal="button_up" from="ReallyQuitMenu/Panel/VBoxContainer/ContinueEdit" to="ReallyQuitMenu" method="close"] -[connection signal="button_up" from="ReallyQuitMenu/Panel/VBoxContainer/QuitDontSave" to="ReallyQuitMenu/Panel/VBoxContainer/QuitDontSave" method="_on_button_up"] +[connection signal="button_up" from="ReallyQuitMenu/VBoxContainer/SaveNQuit" to="ReallyQuitMenu/VBoxContainer/SaveNQuit" method="_on_button_up"] +[connection signal="button_up" from="ReallyQuitMenu/VBoxContainer/ContinueEdit" to="ReallyQuitMenu" method="close"] +[connection signal="button_up" from="ReallyQuitMenu/VBoxContainer/QuitDontSave" to="ReallyQuitMenu/VBoxContainer/QuitDontSave" method="_on_button_up"] diff --git a/src/UserInterface/Screens/MainMenu/ControlsMenu/ReallyQuitMenu.gd b/src/UserInterface/Screens/MainMenu/ControlsMenu/ReallyQuitMenu.gd index e253ecf..5e48882 100644 --- a/src/UserInterface/Screens/MainMenu/ControlsMenu/ReallyQuitMenu.gd +++ b/src/UserInterface/Screens/MainMenu/ControlsMenu/ReallyQuitMenu.gd @@ -3,7 +3,7 @@ extends Panel var prev_focus func open(): - show() + visible = true prev_focus = get_focus_owner() mitigate_ui_navigation_spill_over(true) $"%SaveNQuit".grab_focus() @@ -18,7 +18,7 @@ func mitigate_ui_navigation_spill_over(var value: bool): line.get_node("ChangeButton").focus_mode = mode func close(): - hide() + visible = false mitigate_ui_navigation_spill_over(false) self.release_focus() prev_focus.grab_focus() diff --git a/src/UserInterface/Screens/MainMenu/ControlsMenu/SaveButton.gd b/src/UserInterface/Screens/MainMenu/ControlsMenu/SaveButton.gd index f362b6e..4a3f914 100644 --- a/src/UserInterface/Screens/MainMenu/ControlsMenu/SaveButton.gd +++ b/src/UserInterface/Screens/MainMenu/ControlsMenu/SaveButton.gd @@ -1,7 +1,7 @@ extends Button onready var mapper := $"%InputMapper" -onready var controllsMenu := get_tree().get_current_scene() +onready var controllsMenu := $"../.." func _on_button_up() -> void: mapper.commit_to_changes()