diff --git a/autoloads/game.tscn b/autoloads/game.tscn index 589fcc5..e479506 100644 --- a/autoloads/game.tscn +++ b/autoloads/game.tscn @@ -6,23 +6,30 @@ pause_mode = 2 script = ExtResource( 1 ) +[node name="Music" type="AudioStreamPlayer" parent="."] +volume_db = -13.5 +bus = "music" + [node name="CollecitbleSound" type="AudioStreamPlayer" parent="."] volume_db = -8.0 +bus = "sound" [node name="JumpSound" type="AudioStreamPlayer" parent="."] volume_db = -12.0 +bus = "sound" [node name="ClimbSound" type="AudioStreamPlayer" parent="."] volume_db = -12.0 - -[node name="Music" type="AudioStreamPlayer" parent="."] -volume_db = -13.5 +bus = "sound" [node name="DieSound" type="AudioStreamPlayer" parent="."] volume_db = -12.0 +bus = "sound" [node name="CodeEntrySound" type="AudioStreamPlayer" parent="."] volume_db = -12.0 +bus = "sound" [node name="BossSound" type="AudioStreamPlayer" parent="."] volume_db = -12.0 +bus = "sound" diff --git a/autoloads/options.gd b/autoloads/options.gd new file mode 100644 index 0000000..1907b31 --- /dev/null +++ b/autoloads/options.gd @@ -0,0 +1,64 @@ +extends Node + +#Enums +enum ScalingModes {INTEGER,ASPECT,STRETCH} +enum Filters {NONE,CRT,LCD,BILINEAR} +enum RumbleMode {NONE,NORMAL,BPM} +enum TransSpeed {NONE = 0,SLOW = 1,NORMAL = 2,FAST = 3} +var TRANS_SPEEDS = [0.0000001, 0.8, 0.4, 0.2] +#Game +var rumble = RumbleMode.NONE +#Video +var fullscreen = false +var scaling_mode = ScalingModes.INTEGER +var transition_speed = TransSpeed.NORMAL setget , _get_transition_speed +#Audio +var master_volume = 100 setget _set_master_volume +var music_volume = 100 setget _set_music_volume +var sound_volume = 100 setget _set_sound_volume + + + +func _ready(): + load_options() + +func load_options(): + var file = ConfigFile.new() + file.load("user://options.pr") + +func save_options(): + var file = ConfigFile.new() + #Game + file.set_value("game","rumble",rumble) + #Video + file.set_value("video","fullscreen",fullscreen) + file.set_value("video","scaling_mode",scaling_mode) + file.set_value("video","transition_speed",transition_speed) + #Audio + file.set_value("audio","master_volume",master_volume) + file.set_value("audio","music_volume",music_volume) + file.set_value("audio","sound_volume",sound_volume) + file.save("user://options.pr") + +# Setters + +func _set_fullscreen(value): + fullscreen = value + OS.set_window_fullscreen(value) + +func _get_transition_speed(): + return TRANS_SPEEDS[transition_speed] + +func _set_master_volume(value): + master_volume = value + AudioServer.set_bus_volume_db(0, linear2db(value)) + +func _set_music_volume(value): + music_volume = value + var idx = AudioServer.get_bus_index("music") + AudioServer.set_bus_volume_db(idx, linear2db(value)) + +func _set_sound_volume(value): + sound_volume = value + var idx = AudioServer.get_bus_index("sound") + AudioServer.set_bus_volume_db(idx, linear2db(value)) diff --git a/autoloads/options.tscn b/autoloads/options.tscn new file mode 100644 index 0000000..4ce11bc --- /dev/null +++ b/autoloads/options.tscn @@ -0,0 +1,3 @@ +[gd_scene format=2] + +[node name="Options" type="Node"] diff --git a/default_bus_layout.tres b/default_bus_layout.tres new file mode 100644 index 0000000..5d90951 --- /dev/null +++ b/default_bus_layout.tres @@ -0,0 +1,15 @@ +[gd_resource type="AudioBusLayout" format=2] + +[resource] +bus/1/name = "music" +bus/1/solo = false +bus/1/mute = false +bus/1/bypass_fx = false +bus/1/volume_db = 0.0 +bus/1/send = "Master" +bus/2/name = "sound" +bus/2/solo = false +bus/2/mute = false +bus/2/bypass_fx = false +bus/2/volume_db = 0.0 +bus/2/send = "Master" diff --git a/graphics/hud/hslider_grabber.png b/graphics/hud/hslider_grabber.png new file mode 100644 index 0000000..2553c0f Binary files /dev/null and b/graphics/hud/hslider_grabber.png differ diff --git a/graphics/hud/hslider_grabber.png.import b/graphics/hud/hslider_grabber.png.import new file mode 100644 index 0000000..d67472d --- /dev/null +++ b/graphics/hud/hslider_grabber.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/hslider_grabber.png-c706e239e429c74f08afcd7244f24e5e.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://graphics/hud/hslider_grabber.png" +dest_files=[ "res://.import/hslider_grabber.png-c706e239e429c74f08afcd7244f24e5e.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/graphics/hud/hslider_slider.png b/graphics/hud/hslider_slider.png new file mode 100644 index 0000000..0aa1d39 Binary files /dev/null and b/graphics/hud/hslider_slider.png differ diff --git a/graphics/hud/hslider_slider.png.import b/graphics/hud/hslider_slider.png.import new file mode 100644 index 0000000..59d106a --- /dev/null +++ b/graphics/hud/hslider_slider.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/hslider_slider.png-fb09b533480611aefefa9fcda43d6545.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://graphics/hud/hslider_slider.png" +dest_files=[ "res://.import/hslider_slider.png-fb09b533480611aefefa9fcda43d6545.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/maps/test_room.tscn b/maps/test_room.tscn index fe80d03..d47a73d 100644 --- a/maps/test_room.tscn +++ b/maps/test_room.tscn @@ -169,6 +169,7 @@ material = SubResource( 4 ) position = Vector2( 120, 168 ) z_index = -3 frames = SubResource( 5 ) +frame = 1 playing = true [node name="SawTest4" type="AnimatedSprite" parent="."] @@ -176,7 +177,6 @@ material = SubResource( 4 ) position = Vector2( 160, 168 ) z_index = -3 frames = SubResource( 5 ) -frame = 1 playing = true [node name="SawTest5" type="AnimatedSprite" parent="."] @@ -184,7 +184,6 @@ material = SubResource( 4 ) position = Vector2( 56, 176 ) z_index = -3 frames = SubResource( 5 ) -frame = 1 playing = true [node name="RollingFiend" parent="." instance=ExtResource( 22 )] @@ -192,12 +191,14 @@ position = Vector2( 48, 120 ) [node name="AnimatedSprite" parent="RollingFiend" index="0"] visible = false +frame = 0 [node name="SawTest2" type="AnimatedSprite" parent="RollingFiend"] material = SubResource( 4 ) position = Vector2( 4, 4 ) z_index = -3 frames = SubResource( 5 ) +frame = 1 playing = true [editable path="RollingFiend"] diff --git a/objects/hud/options_screen.tscn b/objects/hud/options_screen.tscn new file mode 100644 index 0000000..5b69260 --- /dev/null +++ b/objects/hud/options_screen.tscn @@ -0,0 +1,446 @@ +[gd_scene load_steps=8 format=2] + +[ext_resource path="res://tilesets/t_gui.tres" type="TileSet" id=1] +[ext_resource path="res://ui/theme.tres" type="Theme" id=2] + +[sub_resource type="ButtonGroup" id=1] + +[sub_resource type="ButtonGroup" id=2] + +[sub_resource type="ButtonGroup" id=3] + +[sub_resource type="ButtonGroup" id=4] + +[sub_resource type="ButtonGroup" id=5] + +[node name="OptionsScreen" type="CanvasLayer"] +layer = 101 + +[node name="TileMap" type="TileMap" parent="."] +position = Vector2( 0, 4 ) +tile_set = ExtResource( 1 ) +cell_size = Vector2( 8, 8 ) +format = 1 +tile_data = PoolIntArray( 65537, 0, 0, 65538, 0, 1, 65539, 0, 1, 65540, 0, 1, 65541, 0, 1, 65542, 0, 1, 65543, 0, 1, 65544, 0, 1, 65545, 0, 1, 65546, 0, 1, 65547, 0, 1, 65548, 0, 1, 65549, 0, 1, 65550, 0, 1, 65551, 0, 1, 65552, 0, 1, 65553, 0, 1, 65554, 0, 1, 65555, 0, 1, 65556, 0, 1, 65557, 0, 1, 65558, 0, 1, 65559, 0, 1, 65560, 0, 1, 65561, 0, 1, 65562, 0, 1, 65563, 0, 1, 65564, 0, 1, 65565, 0, 1, 65566, 536870912, 0, 131073, 0, 2, 131102, 536870912, 2, 196609, 0, 2, 196638, 536870912, 2, 262145, 0, 2, 262174, 536870912, 2, 327681, 0, 2, 327710, 536870912, 2, 393217, 0, 2, 393246, 536870912, 2, 458753, 0, 2, 458782, 536870912, 2, 524289, 0, 2, 524318, 536870912, 2, 589825, 0, 2, 589854, 536870912, 2, 655361, 0, 2, 655390, 536870912, 2, 720897, 0, 2, 720926, 536870912, 2, 786433, 0, 2, 786462, 536870912, 2, 851969, 0, 2, 851998, 536870912, 2, 917505, 0, 2, 917534, 536870912, 2, 983041, 0, 2, 983070, 536870912, 2, 1048577, 0, 2, 1048606, 536870912, 2, 1114113, 0, 2, 1114142, 536870912, 2, 1179649, 0, 2, 1179678, 536870912, 2, 1245185, 0, 2, 1245214, 536870912, 2, 1310721, 0, 2, 1310750, 536870912, 2, 1376257, 1073741824, 0, 1376258, 1073741824, 1, 1376259, 1073741824, 1, 1376260, 1073741824, 1, 1376261, 1073741824, 1, 1376262, 1073741824, 1, 1376263, 1073741824, 1, 1376264, 1073741824, 1, 1376265, 1073741824, 1, 1376266, 1073741824, 1, 1376267, 1073741824, 1, 1376268, 1073741824, 1, 1376269, 1073741824, 1, 1376270, 1073741824, 1, 1376271, 1073741824, 1, 1376272, 1073741824, 1, 1376273, 1073741824, 1, 1376274, 1073741824, 1, 1376275, 1073741824, 1, 1376276, 1073741824, 1, 1376277, 1073741824, 1, 1376278, 1073741824, 1, 1376279, 1073741824, 1, 1376280, 1073741824, 1, 1376281, 1073741824, 1, 1376282, 1073741824, 1, 1376283, 1073741824, 1, 1376284, 1073741824, 1, 1376285, 1073741824, 1, 1376286, 1610612736, 0 ) + +[node name="ColorRect" type="ColorRect" parent="."] +margin_left = 11.0 +margin_top = 20.0 +margin_right = 245.0 +margin_bottom = 172.0 +color = Color( 0.239216, 0.239216, 0.443137, 1 ) + +[node name="OptionsTitle" type="Label" parent="."] +margin_left = 16.0 +margin_top = 24.0 +margin_right = 240.0 +margin_bottom = 40.0 +theme = ExtResource( 2 ) +text = "-OPTIONS-" +align = 1 + +[node name="TabContainer" type="TabContainer" parent="."] +margin_left = 16.0 +margin_top = 40.0 +margin_right = 240.0 +margin_bottom = 152.0 +theme = ExtResource( 2 ) + +[node name="Game" type="VBoxContainer" parent="TabContainer"] +visible = false +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_top = 7.0 +custom_constants/separation = 0 + +[node name="Spacer" type="Control" parent="TabContainer/Game"] +margin_right = 224.0 +margin_bottom = 8.0 +rect_min_size = Vector2( 0, 8 ) + +[node name="Rumble" type="HBoxContainer" parent="TabContainer/Game"] +margin_top = 8.0 +margin_right = 224.0 +margin_bottom = 28.0 +rect_min_size = Vector2( 0, 20 ) + +[node name="Label" type="Label" parent="TabContainer/Game/Rumble"] +margin_right = 71.0 +margin_bottom = 20.0 +size_flags_horizontal = 3 +size_flags_vertical = 1 +text = "Rumble: +" + +[node name="None" type="Button" parent="TabContainer/Game/Rumble"] +margin_left = 75.0 +margin_right = 103.0 +margin_bottom = 7.0 +size_flags_vertical = 0 +toggle_mode = true +action_mode = 0 +group = SubResource( 1 ) +text = "None" + +[node name="Normal" type="Button" parent="TabContainer/Game/Rumble"] +margin_left = 107.0 +margin_right = 149.0 +margin_bottom = 7.0 +size_flags_vertical = 0 +toggle_mode = true +action_mode = 0 +group = SubResource( 1 ) +text = "Normal" + +[node name="BPM" type="Button" parent="TabContainer/Game/Rumble"] +margin_left = 153.0 +margin_right = 224.0 +margin_bottom = 7.0 +size_flags_horizontal = 3 +size_flags_vertical = 0 +toggle_mode = true +pressed = true +action_mode = 0 +group = SubResource( 1 ) +text = "BPM" +align = 0 + +[node name="Video" type="VBoxContainer" parent="TabContainer"] +visible = false +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_top = 7.0 +custom_constants/separation = 0 + +[node name="Spacer" type="Control" parent="TabContainer/Video"] +margin_right = 224.0 +margin_bottom = 8.0 +rect_min_size = Vector2( 0, 8 ) + +[node name="Fullscreen" type="HBoxContainer" parent="TabContainer/Video"] +margin_top = 8.0 +margin_right = 224.0 +margin_bottom = 28.0 +rect_min_size = Vector2( 0, 20 ) + +[node name="Label" type="Label" parent="TabContainer/Video/Fullscreen"] +margin_right = 140.0 +margin_bottom = 20.0 +size_flags_horizontal = 3 +size_flags_vertical = 1 +text = "Start in fullscreen:" + +[node name="Off" type="Button" parent="TabContainer/Video/Fullscreen"] +margin_left = 144.0 +margin_right = 206.0 +margin_bottom = 7.0 +size_flags_horizontal = 3 +size_flags_vertical = 0 +toggle_mode = true +action_mode = 0 +group = SubResource( 2 ) +text = "Off" + +[node name="On" type="Button" parent="TabContainer/Video/Fullscreen"] +margin_left = 210.0 +margin_right = 224.0 +margin_bottom = 7.0 +size_flags_vertical = 0 +toggle_mode = true +pressed = true +action_mode = 0 +group = SubResource( 2 ) +text = "on" + +[node name="WindowSize" type="HBoxContainer" parent="TabContainer/Video"] +margin_top = 28.0 +margin_right = 224.0 +margin_bottom = 48.0 +rect_min_size = Vector2( 0, 20 ) + +[node name="Label" type="Label" parent="TabContainer/Video/WindowSize"] +margin_right = 84.0 +margin_bottom = 20.0 +size_flags_horizontal = 3 +size_flags_vertical = 1 +text = "Window Size:" + +[node name="1x" type="Button" parent="TabContainer/Video/WindowSize"] +margin_left = 88.0 +margin_right = 112.0 +margin_bottom = 7.0 +size_flags_horizontal = 3 +size_flags_vertical = 0 +toggle_mode = true +pressed = true +action_mode = 0 +group = SubResource( 3 ) +text = "1x" + +[node name="2x" type="Button" parent="TabContainer/Video/WindowSize"] +margin_left = 116.0 +margin_right = 140.0 +margin_bottom = 7.0 +size_flags_horizontal = 3 +size_flags_vertical = 0 +toggle_mode = true +action_mode = 0 +group = SubResource( 3 ) +text = "2x" + +[node name="3x" type="Button" parent="TabContainer/Video/WindowSize"] +margin_left = 144.0 +margin_right = 168.0 +margin_bottom = 7.0 +size_flags_horizontal = 3 +size_flags_vertical = 0 +toggle_mode = true +action_mode = 0 +group = SubResource( 3 ) +text = "3x" + +[node name="4x" type="Button" parent="TabContainer/Video/WindowSize"] +margin_left = 172.0 +margin_right = 196.0 +margin_bottom = 7.0 +size_flags_horizontal = 3 +size_flags_vertical = 0 +toggle_mode = true +action_mode = 0 +group = SubResource( 3 ) +text = "4x" + +[node name="5x" type="Button" parent="TabContainer/Video/WindowSize"] +margin_left = 200.0 +margin_right = 224.0 +margin_bottom = 7.0 +size_flags_horizontal = 3 +size_flags_vertical = 0 +toggle_mode = true +action_mode = 0 +group = SubResource( 3 ) +text = "5x" + +[node name="ScalingMode" type="HBoxContainer" parent="TabContainer/Video"] +margin_top = 48.0 +margin_right = 224.0 +margin_bottom = 68.0 +rect_min_size = Vector2( 0, 20 ) + +[node name="Label" type="Label" parent="TabContainer/Video/ScalingMode"] +margin_right = 56.0 +margin_bottom = 20.0 +size_flags_horizontal = 3 +size_flags_vertical = 1 +text = "Scaling:" + +[node name="Integer" type="Button" parent="TabContainer/Video/ScalingMode"] +margin_left = 60.0 +margin_right = 113.0 +margin_bottom = 7.0 +size_flags_horizontal = 3 +size_flags_vertical = 0 +toggle_mode = true +pressed = true +action_mode = 0 +group = SubResource( 4 ) +text = "integer" + +[node name="Aspect" type="Button" parent="TabContainer/Video/ScalingMode"] +margin_left = 117.0 +margin_right = 171.0 +margin_bottom = 7.0 +size_flags_horizontal = 3 +size_flags_vertical = 0 +toggle_mode = true +action_mode = 0 +group = SubResource( 4 ) +text = "aspect" + +[node name="Stretch" type="Button" parent="TabContainer/Video/ScalingMode"] +margin_left = 175.0 +margin_right = 224.0 +margin_bottom = 7.0 +size_flags_vertical = 0 +toggle_mode = true +action_mode = 0 +group = SubResource( 4 ) +text = "stretch" +align = 0 + +[node name="TransitionSpeed" type="HBoxContainer" parent="TabContainer/Video"] +margin_top = 68.0 +margin_right = 224.0 +margin_bottom = 88.0 +rect_min_size = Vector2( 0, 20 ) + +[node name="Label" type="Label" parent="TabContainer/Video/TransitionSpeed"] +margin_right = 77.0 +margin_bottom = 20.0 +size_flags_horizontal = 3 +size_flags_vertical = 1 +text = "Fade speed:" + +[node name="None" type="Button" parent="TabContainer/Video/TransitionSpeed"] +margin_left = 81.0 +margin_right = 110.0 +margin_bottom = 7.0 +size_flags_horizontal = 3 +size_flags_vertical = 0 +toggle_mode = true +action_mode = 0 +group = SubResource( 5 ) +text = "None" + +[node name="Slow" type="Button" parent="TabContainer/Video/TransitionSpeed"] +margin_left = 114.0 +margin_right = 144.0 +margin_bottom = 7.0 +size_flags_horizontal = 3 +size_flags_vertical = 0 +toggle_mode = true +action_mode = 0 +group = SubResource( 5 ) +text = "slow" + +[node name="Medium" type="Button" parent="TabContainer/Video/TransitionSpeed"] +margin_left = 148.0 +margin_right = 190.0 +margin_bottom = 7.0 +size_flags_horizontal = 3 +size_flags_vertical = 0 +toggle_mode = true +pressed = true +action_mode = 0 +group = SubResource( 5 ) +text = "Medium" + +[node name="Fast" type="Button" parent="TabContainer/Video/TransitionSpeed"] +margin_left = 194.0 +margin_right = 224.0 +margin_bottom = 7.0 +size_flags_horizontal = 3 +size_flags_vertical = 0 +toggle_mode = true +action_mode = 0 +group = SubResource( 5 ) +text = "Fast" + +[node name="Audio" type="VBoxContainer" parent="TabContainer"] +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_top = 7.0 +custom_constants/separation = 0 + +[node name="Spacer" type="Control" parent="TabContainer/Audio"] +margin_right = 224.0 +margin_bottom = 8.0 +rect_min_size = Vector2( 0, 8 ) + +[node name="MasterVolume" type="HBoxContainer" parent="TabContainer/Audio"] +margin_top = 8.0 +margin_right = 224.0 +margin_bottom = 28.0 +rect_min_size = Vector2( 0, 20 ) + +[node name="Label" type="Label" parent="TabContainer/Audio/MasterVolume"] +margin_right = 95.0 +margin_bottom = 20.0 +size_flags_horizontal = 3 +size_flags_vertical = 1 +text = "Master vol.:" + +[node name="HSlider" type="HSlider" parent="TabContainer/Audio/MasterVolume"] +margin_left = 99.0 +margin_right = 199.0 +margin_bottom = 10.0 +rect_min_size = Vector2( 100, 0 ) +size_flags_horizontal = 3 +value = 100.0 +__meta__ = { +"_edit_group_": true +} + +[node name="Volume" type="Label" parent="TabContainer/Audio/MasterVolume"] +margin_left = 203.0 +margin_right = 224.0 +margin_bottom = 20.0 +size_flags_horizontal = 9 +size_flags_vertical = 1 +text = "100" + +[node name="MusicVolume" type="HBoxContainer" parent="TabContainer/Audio"] +margin_top = 28.0 +margin_right = 224.0 +margin_bottom = 48.0 +rect_min_size = Vector2( 0, 20 ) + +[node name="Label" type="Label" parent="TabContainer/Audio/MusicVolume"] +margin_right = 95.0 +margin_bottom = 20.0 +size_flags_horizontal = 3 +size_flags_vertical = 1 +text = "music vol.:" + +[node name="HSlider" type="HSlider" parent="TabContainer/Audio/MusicVolume"] +margin_left = 99.0 +margin_right = 199.0 +margin_bottom = 10.0 +rect_min_size = Vector2( 100, 0 ) +size_flags_horizontal = 3 +value = 100.0 +__meta__ = { +"_edit_group_": true +} + +[node name="Volume" type="Label" parent="TabContainer/Audio/MusicVolume"] +margin_left = 203.0 +margin_right = 224.0 +margin_bottom = 20.0 +size_flags_horizontal = 9 +size_flags_vertical = 1 +text = "100" + +[node name="SoundVolume" type="HBoxContainer" parent="TabContainer/Audio"] +margin_top = 48.0 +margin_right = 224.0 +margin_bottom = 68.0 +rect_min_size = Vector2( 0, 20 ) + +[node name="Label" type="Label" parent="TabContainer/Audio/SoundVolume"] +margin_right = 95.0 +margin_bottom = 20.0 +size_flags_horizontal = 3 +size_flags_vertical = 1 +text = "SOund vol.:" + +[node name="HSlider" type="HSlider" parent="TabContainer/Audio/SoundVolume"] +margin_left = 99.0 +margin_right = 199.0 +margin_bottom = 10.0 +rect_min_size = Vector2( 100, 0 ) +size_flags_horizontal = 3 +value = 100.0 +__meta__ = { +"_edit_group_": true +} + +[node name="Volume" type="Label" parent="TabContainer/Audio/SoundVolume"] +margin_left = 203.0 +margin_right = 224.0 +margin_bottom = 20.0 +size_flags_horizontal = 9 +size_flags_vertical = 1 +text = "100" + +[node name="HBoxContainer" type="VBoxContainer" parent="."] +margin_left = 16.0 +margin_top = 152.0 +margin_right = 240.0 +margin_bottom = 170.0 +theme = ExtResource( 2 ) + +[node name="Controls" type="Label" parent="HBoxContainer"] +margin_right = 224.0 +margin_bottom = 7.0 +text = "Z: back, X: apply, C: defaults" diff --git a/objects/hud/pause_screen.tscn b/objects/hud/pause_screen.tscn index ceb7eb5..ddc204e 100644 --- a/objects/hud/pause_screen.tscn +++ b/objects/hud/pause_screen.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=7 format=2] +[gd_scene load_steps=8 format=2] [ext_resource path="res://tilesets/t_gui.tres" type="TileSet" id=1] [ext_resource path="res://ui/theme.tres" type="Theme" id=2] @@ -6,6 +6,7 @@ [ext_resource path="res://objects/hud/pause_screen.gd" type="Script" id=4] [ext_resource path="res://ui/2ndpuberty_no_dropshadow.tres" type="Theme" id=5] [ext_resource path="res://ui/2ndpuberty_outline.tres" type="Material" id=6] +[ext_resource path="res://objects/hud/options_screen.tscn" type="PackedScene" id=7] [node name="PauseScreen" type="CanvasLayer"] pause_mode = 2 @@ -91,6 +92,9 @@ texture_focused = ExtResource( 3 ) [node name="StaticBody2D" type="StaticBody2D" parent="."] +[node name="OptionsScreen" parent="." instance=ExtResource( 7 )] +visible = false + [connection signal="pressed" from="Body/Resume" to="." method="_on_Resume_pressed"] [connection signal="pressed" from="Body/Restart" to="." method="_on_Restart_pressed"] [connection signal="pressed" from="Body/ExitLevel" to="." method="_on_ExitLevel_pressed"] diff --git a/ui/theme.tres b/ui/theme.tres index ee204c5..059a340 100644 --- a/ui/theme.tres +++ b/ui/theme.tres @@ -1,6 +1,38 @@ -[gd_resource type="Theme" load_steps=2 format=2] +[gd_resource type="Theme" load_steps=10 format=2] [ext_resource path="res://ui/2ndpuberty..fnt" type="BitmapFont" id=1] +[ext_resource path="res://graphics/hud/hslider_slider.png" type="Texture" id=2] +[ext_resource path="res://graphics/hud/hslider_grabber.png" type="Texture" id=3] + +[sub_resource type="StyleBoxEmpty" id=3] + +[sub_resource type="StyleBoxEmpty" id=4] + +[sub_resource type="StyleBoxEmpty" id=5] + +[sub_resource type="StyleBoxTexture" id=6] +texture = ExtResource( 2 ) +region_rect = Rect2( 0, 0, 1, 8 ) + +[sub_resource type="StyleBoxEmpty" id=1] + +[sub_resource type="StyleBoxEmpty" id=2] +content_margin_left = 4.0 +content_margin_right = 4.0 [resource] default_font = ExtResource( 1 ) +Button/colors/font_color = Color( 0.690196, 0.690196, 0.690196, 1 ) +Button/styles/disabled = SubResource( 3 ) +Button/styles/focus = SubResource( 3 ) +Button/styles/hover = SubResource( 3 ) +Button/styles/normal = SubResource( 3 ) +Button/styles/pressed = SubResource( 3 ) +HSlider/icons/grabber = ExtResource( 3 ) +HSlider/styles/grabber_area = SubResource( 4 ) +HSlider/styles/grabber_area_highlight = SubResource( 5 ) +HSlider/styles/slider = SubResource( 6 ) +TabContainer/styles/panel = SubResource( 1 ) +TabContainer/styles/tab_bg = SubResource( 2 ) +TabContainer/styles/tab_disabled = SubResource( 2 ) +TabContainer/styles/tab_fg = SubResource( 2 )