diff options
author | Logan <logan@cflip.net> | 2023-02-01 17:47:16 -0700 |
---|---|---|
committer | Logan <logan@cflip.net> | 2023-02-01 17:47:16 -0700 |
commit | 54009bf168335050880ae16f5d456fdad0defc78 (patch) | |
tree | 1632927bfc01f21d6fdc4e54f909729bb055eb71 | |
parent | dd91a66238b1df039321c9a11e7c038e50b45c21 (diff) |
Configured theme file and made small changes to UI
-rw-r--r-- | scenes/mainmenu.tscn | 26 | ||||
-rw-r--r-- | scenes/optionsmenu.tscn | 84 | ||||
-rw-r--r-- | scripts/optionsmenu.gd | 2 | ||||
-rw-r--r-- | textures/check_button_off.png | bin | 0 -> 693 bytes | |||
-rw-r--r-- | textures/check_button_off.png.import | 35 | ||||
-rw-r--r-- | textures/check_button_on.png | bin | 0 -> 692 bytes | |||
-rw-r--r-- | textures/check_button_on.png.import | 35 | ||||
-rw-r--r-- | theme_data/interface_theme.tres | 113 |
8 files changed, 236 insertions, 59 deletions
diff --git a/scenes/mainmenu.tscn b/scenes/mainmenu.tscn index 492435a..428593f 100644 --- a/scenes/mainmenu.tscn +++ b/scenes/mainmenu.tscn @@ -8,12 +8,13 @@ [node name="Menu" type="Control"] margin_right = 214.0 margin_bottom = 120.0 +theme = ExtResource( 4 ) script = ExtResource( 1 ) [node name="ColorRect" type="ColorRect" parent="."] margin_right = 214.0 margin_bottom = 120.0 -color = Color( 0, 0, 0, 1 ) +color = Color( 0.0823529, 0.0745098, 0.117647, 1 ) [node name="Label" type="Label" parent="."] anchor_left = 0.5 @@ -21,7 +22,6 @@ anchor_right = 0.5 margin_left = -48.0 margin_right = 48.0 margin_bottom = 16.0 -custom_colors/font_color_shadow = Color( 0.894118, 0.313726, 0, 1 ) text = "BasketBALLAZ" [node name="Control" type="Control" parent="."] @@ -41,40 +41,40 @@ margin_bottom = 76.0 [node name="StartButton" type="Button" parent="Control/VBoxContainer"] margin_right = 100.0 -margin_bottom = 22.0 +margin_bottom = 18.0 text = "Start" [node name="LeaderboardButton" type="Button" parent="Control/VBoxContainer"] -margin_top = 26.0 +margin_top = 22.0 margin_right = 100.0 -margin_bottom = 48.0 +margin_bottom = 40.0 disabled = true text = "Leaderboard" [node name="HelpButton" type="Button" parent="Control/VBoxContainer"] -margin_top = 52.0 +margin_top = 44.0 margin_right = 100.0 -margin_bottom = 74.0 +margin_bottom = 62.0 disabled = true text = "Help" [node name="OptionsButton" type="Button" parent="Control/VBoxContainer"] -margin_top = 78.0 +margin_top = 66.0 margin_right = 100.0 -margin_bottom = 100.0 +margin_bottom = 84.0 text = "Options" [node name="CreditsButton" type="Button" parent="Control/VBoxContainer"] -margin_top = 104.0 +margin_top = 88.0 margin_right = 100.0 -margin_bottom = 126.0 +margin_bottom = 106.0 disabled = true text = "Credits" [node name="QuitButton" type="Button" parent="Control/VBoxContainer"] -margin_top = 130.0 +margin_top = 110.0 margin_right = 100.0 -margin_bottom = 152.0 +margin_bottom = 128.0 text = "Quit" [node name="MusicAudio" type="AudioStreamPlayer" parent="."] diff --git a/scenes/optionsmenu.tscn b/scenes/optionsmenu.tscn index bbd813c..c3f7338 100644 --- a/scenes/optionsmenu.tscn +++ b/scenes/optionsmenu.tscn @@ -1,17 +1,14 @@ [gd_scene load_steps=3 format=2] -[ext_resource path="res://textures/release_indicator.png" type="Texture" id=1] [ext_resource path="res://scripts/optionsmenu.gd" type="Script" id=2] +[ext_resource path="res://theme_data/interface_theme.tres" type="Theme" id=3] [node name="OptionsMenu" type="Control"] margin_right = 214.0 margin_bottom = 120.0 +theme = ExtResource( 3 ) script = ExtResource( 2 ) -[node name="Panel" type="Panel" parent="."] -margin_right = 214.0 -margin_bottom = 120.0 - [node name="Control" type="Control" parent="."] anchor_right = 1.0 anchor_bottom = 1.0 @@ -19,124 +16,123 @@ margin_right = 321.0 margin_bottom = 180.0 rect_scale = Vector2( 0.4, 0.4 ) +[node name="Panel" type="Panel" parent="Control"] +anchor_right = 1.0 +anchor_bottom = 1.0 + [node name="VBoxContainer" type="VBoxContainer" parent="Control"] anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 anchor_bottom = 0.5 margin_left = -165.5 -margin_top = -55.0 +margin_top = -49.0 margin_right = 165.5 -margin_bottom = 55.0 +margin_bottom = 49.0 [node name="GridContainer" type="GridContainer" parent="Control/VBoxContainer"] margin_right = 331.0 -margin_bottom = 84.0 +margin_bottom = 76.0 columns = 2 [node name="FullscreenLabel" type="Label" parent="Control/VBoxContainer/GridContainer"] -margin_top = 4.0 margin_right = 127.0 -margin_bottom = 20.0 +margin_bottom = 16.0 text = "Fullscreen" -[node name="FullscreenCheckBox" type="CheckBox" parent="Control/VBoxContainer/GridContainer"] -margin_left = 307.0 +[node name="FullscreenCheckButton" type="CheckButton" parent="Control/VBoxContainer/GridContainer"] +margin_left = 299.0 margin_right = 331.0 -margin_bottom = 24.0 +margin_bottom = 16.0 size_flags_horizontal = 10 -icon_align = 2 [node name="VolumeMasterLabel" type="Label" parent="Control/VBoxContainer/GridContainer"] -margin_top = 28.0 +margin_top = 20.0 margin_right = 104.0 -margin_bottom = 44.0 +margin_bottom = 36.0 size_flags_horizontal = 2 text = "Master Volume" [node name="VolumeMasterContainer" type="HBoxContainer" parent="Control/VBoxContainer/GridContainer"] margin_left = 131.0 -margin_top = 28.0 +margin_top = 20.0 margin_right = 331.0 -margin_bottom = 44.0 +margin_bottom = 36.0 rect_min_size = Vector2( 200, 0 ) [node name="VolumeMasterSlider" type="HSlider" parent="Control/VBoxContainer/GridContainer/VolumeMasterContainer"] margin_right = 150.0 margin_bottom = 16.0 rect_min_size = Vector2( 150, 0 ) -custom_icons/grabber_highlight = ExtResource( 1 ) -custom_icons/grabber = ExtResource( 1 ) -value = 50.0 +min_value = -50.0 +max_value = 50.0 [node name="VolumeMasterValue" type="Label" parent="Control/VBoxContainer/GridContainer/VolumeMasterContainer"] -margin_left = 168.0 +margin_left = 176.0 margin_right = 200.0 margin_bottom = 16.0 size_flags_horizontal = 10 -text = "100%" +text = "50%" [node name="VolumeMusicLabel" type="Label" parent="Control/VBoxContainer/GridContainer"] -margin_top = 48.0 +margin_top = 40.0 margin_right = 127.0 -margin_bottom = 64.0 +margin_bottom = 56.0 text = "Music Volume" [node name="VolumeMusicContainer" type="HBoxContainer" parent="Control/VBoxContainer/GridContainer"] margin_left = 131.0 -margin_top = 48.0 +margin_top = 40.0 margin_right = 331.0 -margin_bottom = 64.0 +margin_bottom = 56.0 [node name="VolumeMusicSlider" type="HSlider" parent="Control/VBoxContainer/GridContainer/VolumeMusicContainer"] margin_right = 150.0 margin_bottom = 16.0 rect_min_size = Vector2( 150, 0 ) -custom_icons/grabber_highlight = ExtResource( 1 ) -custom_icons/grabber = ExtResource( 1 ) -value = 50.0 +min_value = -50.0 +max_value = 50.0 [node name="VolumeMusicValue" type="Label" parent="Control/VBoxContainer/GridContainer/VolumeMusicContainer"] -margin_left = 168.0 +margin_left = 176.0 margin_right = 200.0 margin_bottom = 16.0 size_flags_horizontal = 10 -text = "100%" +text = "50%" [node name="VolumeSFXLabel" type="Label" parent="Control/VBoxContainer/GridContainer"] -margin_top = 68.0 +margin_top = 60.0 margin_right = 127.0 -margin_bottom = 84.0 +margin_bottom = 76.0 text = "SFX Volume" [node name="VolumeSFXContainer" type="HBoxContainer" parent="Control/VBoxContainer/GridContainer"] margin_left = 131.0 -margin_top = 68.0 +margin_top = 60.0 margin_right = 331.0 -margin_bottom = 84.0 +margin_bottom = 76.0 [node name="VolumeSFXSlider" type="HSlider" parent="Control/VBoxContainer/GridContainer/VolumeSFXContainer"] margin_right = 150.0 margin_bottom = 16.0 rect_min_size = Vector2( 150, 0 ) -custom_icons/grabber_highlight = ExtResource( 1 ) -custom_icons/grabber = ExtResource( 1 ) -value = 50.0 +min_value = -50.0 +max_value = 50.0 [node name="VolumeSFXValue" type="Label" parent="Control/VBoxContainer/GridContainer/VolumeSFXContainer"] -margin_left = 168.0 +margin_left = 176.0 margin_right = 200.0 margin_bottom = 16.0 size_flags_horizontal = 10 -text = "100%" +text = "50%" [node name="ReturnButton" type="Button" parent="Control/VBoxContainer"] -margin_top = 88.0 +margin_top = 80.0 margin_right = 331.0 -margin_bottom = 110.0 +margin_bottom = 98.0 text = "Return" -[connection signal="pressed" from="Control/VBoxContainer/GridContainer/FullscreenCheckBox" to="." method="_on_FullscreenCheckBox_pressed"] +[connection signal="toggled" from="Control/VBoxContainer/GridContainer/FullscreenCheckButton" to="." method="_on_FullscreenCheckButton_toggled"] [connection signal="value_changed" from="Control/VBoxContainer/GridContainer/VolumeMasterContainer/VolumeMasterSlider" to="." method="_on_VolumeMasterSlider_value_changed"] [connection signal="value_changed" from="Control/VBoxContainer/GridContainer/VolumeMusicContainer/VolumeMusicSlider" to="." method="_on_VolumeMusicSlider_value_changed"] [connection signal="value_changed" from="Control/VBoxContainer/GridContainer/VolumeSFXContainer/VolumeSFXSlider" to="." method="_on_VolumeSFXSlider_value_changed"] diff --git a/scripts/optionsmenu.gd b/scripts/optionsmenu.gd index 7c6dbb9..3da0250 100644 --- a/scripts/optionsmenu.gd +++ b/scripts/optionsmenu.gd @@ -37,5 +37,5 @@ func _on_VolumeSFXSlider_value_changed(value): else: global_variables.volume_sfx_enabled = true -func _on_FullscreenCheckBox_pressed(): +func _on_FullscreenCheckButton_toggled(_button_pressed): OS.window_fullscreen = !OS.window_fullscreen diff --git a/textures/check_button_off.png b/textures/check_button_off.png Binary files differnew file mode 100644 index 0000000..02c3865 --- /dev/null +++ b/textures/check_button_off.png diff --git a/textures/check_button_off.png.import b/textures/check_button_off.png.import new file mode 100644 index 0000000..d115385 --- /dev/null +++ b/textures/check_button_off.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/check_button_off.png-ab90c2ffb39799a4e841d6e4a76e78c3.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://textures/check_button_off.png" +dest_files=[ "res://.import/check_button_off.png-ab90c2ffb39799a4e841d6e4a76e78c3.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=false +svg/scale=1.0 diff --git a/textures/check_button_on.png b/textures/check_button_on.png Binary files differnew file mode 100644 index 0000000..2539aee --- /dev/null +++ b/textures/check_button_on.png diff --git a/textures/check_button_on.png.import b/textures/check_button_on.png.import new file mode 100644 index 0000000..c81dcc9 --- /dev/null +++ b/textures/check_button_on.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/check_button_on.png-4b6e9fead6938785e8ab7a6adad181ec.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://textures/check_button_on.png" +dest_files=[ "res://.import/check_button_on.png-4b6e9fead6938785e8ab7a6adad181ec.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=false +svg/scale=1.0 diff --git a/theme_data/interface_theme.tres b/theme_data/interface_theme.tres index c536e8b..db80033 100644 --- a/theme_data/interface_theme.tres +++ b/theme_data/interface_theme.tres @@ -1,4 +1,115 @@ -[gd_resource type="Theme" format=2] +[gd_resource type="Theme" load_steps=13 format=2] + +[ext_resource path="res://textures/check_button_off.png" type="Texture" id=1] +[ext_resource path="res://textures/check_button_on.png" type="Texture" id=2] +[ext_resource path="res://textures/release_indicator.png" type="Texture" id=3] + +[sub_resource type="StyleBoxFlat" id=4] +bg_color = Color( 0.109804, 0.101961, 0.160784, 1 ) +border_width_left = 1 +border_width_top = 1 +border_width_right = 1 +border_width_bottom = 1 +border_color = Color( 0.168627, 0.156863, 0.247059, 1 ) + +[sub_resource type="StyleBoxFlat" id=5] +bg_color = Color( 0.109804, 0.101961, 0.160784, 1 ) +draw_center = false +border_width_left = 1 +border_width_top = 1 +border_width_right = 1 +border_width_bottom = 1 +border_color = Color( 0.392157, 0.466667, 0.615686, 1 ) + +[sub_resource type="StyleBoxFlat" id=3] +bg_color = Color( 0.270588, 0.294118, 0.443137, 1 ) +border_width_left = 1 +border_width_top = 1 +border_width_right = 1 +border_width_bottom = 1 +border_color = Color( 0.462745, 0.623529, 0.72549, 1 ) + +[sub_resource type="StyleBoxFlat" id=6] +bg_color = Color( 0.109804, 0.101961, 0.160784, 1 ) +border_width_left = 1 +border_width_top = 1 +border_width_right = 1 +border_width_bottom = 1 +border_color = Color( 0.168627, 0.156863, 0.247059, 1 ) + +[sub_resource type="StyleBoxFlat" id=8] +bg_color = Color( 0.392157, 0.466667, 0.615686, 1 ) +border_width_left = 1 +border_width_top = 1 +border_width_right = 1 +border_width_bottom = 1 +border_color = Color( 0.462745, 0.623529, 0.72549, 1 ) + +[sub_resource type="StyleBoxEmpty" id=7] + +[sub_resource type="StyleBoxFlat" id=9] +bg_color = Color( 0.270588, 0.294118, 0.443137, 1 ) + +[sub_resource type="StyleBoxFlat" id=11] +content_margin_top = 5.0 +content_margin_bottom = 5.0 +bg_color = Color( 0.109804, 0.101961, 0.160784, 1 ) +border_width_left = 1 +border_width_top = 1 +border_width_right = 1 +border_width_bottom = 1 +border_color = Color( 0.392157, 0.466667, 0.615686, 1 ) +expand_margin_left = 1.0 +expand_margin_right = 1.0 +expand_margin_top = 1.0 +expand_margin_bottom = 1.0 + +[sub_resource type="StyleBoxFlat" id=1] +bg_color = Color( 0.0823529, 0.0745098, 0.117647, 1 ) +border_width_left = 2 +border_width_top = 2 +border_width_right = 2 +border_width_bottom = 2 +border_color = Color( 0.203922, 0.227451, 0.384314, 1 ) [resource] +Button/colors/font_color = Color( 0.270588, 0.294118, 0.443137, 1 ) +Button/colors/font_color_disabled = Color( 0.168627, 0.156863, 0.247059, 1 ) +Button/colors/font_color_focus = Color( 0.270588, 0.294118, 0.443137, 1 ) +Button/colors/font_color_hover = Color( 0.733333, 0.835294, 0.898039, 1 ) +Button/colors/font_color_pressed = Color( 0.796078, 0.894118, 0.952941, 1 ) +Button/constants/hseparation = 0 +Button/fonts/font = null +Button/styles/disabled = SubResource( 4 ) +Button/styles/focus = SubResource( 5 ) +Button/styles/hover = SubResource( 3 ) +Button/styles/normal = SubResource( 6 ) +Button/styles/pressed = SubResource( 8 ) +CheckButton/colors/font_color = Color( 0, 0, 0, 1 ) +CheckButton/colors/font_color_disabled = Color( 0, 0, 0, 1 ) +CheckButton/colors/font_color_focus = Color( 0, 0, 0, 1 ) +CheckButton/colors/font_color_hover = Color( 0, 0, 0, 1 ) +CheckButton/colors/font_color_hover_pressed = Color( 0, 0, 0, 1 ) +CheckButton/colors/font_color_pressed = Color( 0, 0, 0, 1 ) +CheckButton/constants/check_vadjust = 0 +CheckButton/constants/hseparation = 0 +CheckButton/fonts/font = null +CheckButton/icons/off = ExtResource( 1 ) +CheckButton/icons/off_disabled = null +CheckButton/icons/on = ExtResource( 2 ) +CheckButton/icons/on_disabled = null +CheckButton/styles/disabled = SubResource( 7 ) +CheckButton/styles/focus = SubResource( 7 ) +CheckButton/styles/hover = SubResource( 7 ) +CheckButton/styles/hover_pressed = SubResource( 7 ) +CheckButton/styles/normal = SubResource( 7 ) +CheckButton/styles/pressed = SubResource( 7 ) +HSlider/icons/grabber = ExtResource( 3 ) +HSlider/icons/grabber_disabled = ExtResource( 3 ) +HSlider/icons/grabber_highlight = ExtResource( 3 ) +HSlider/icons/tick = ExtResource( 3 ) +HSlider/styles/grabber_area = SubResource( 9 ) +HSlider/styles/grabber_area_highlight = SubResource( 9 ) +HSlider/styles/slider = SubResource( 11 ) Label/colors/font_color_shadow = Color( 0.270588, 0.294118, 0.443137, 1 ) +Panel/styles/panel = SubResource( 1 ) |