1
0
mirror of https://github.com/JohnBreaux/Boat-Battle.git synced 2025-02-04 12:28:35 +00:00

Added Dark and Light Themes

This commit is contained in:
tommy-l-ngo
2021-11-14 02:50:39 -06:00
parent 428c59115f
commit de9684d22f
11 changed files with 285 additions and 83 deletions

View File

@@ -16,16 +16,16 @@ anchor_left = 0.912
anchor_top = 0.932
anchor_right = 0.912
anchor_bottom = 0.932
margin_left = -3.68005
margin_top = -4.52002
margin_right = 49.3199
margin_bottom = 15.48
margin_left = -37.68
margin_top = -329.52
margin_right = 50.32
margin_bottom = -305.52
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Forfeit" type="Button" parent="Buttons"]
margin_right = 53.0
margin_right = 88.0
margin_bottom = 20.0
text = "Forfeit"
@@ -47,10 +47,11 @@ __meta__ = {
}
[node name="Button" type="Button" parent="."]
margin_left = 599.361
margin_top = 2.97302
margin_right = 636.361
margin_bottom = 22.973
visible = false
margin_left = 6.4668
margin_top = 6.14783
margin_right = 43.4668
margin_bottom = 26.1478
text = "Win"
[connection signal="pressed" from="Buttons/Forfeit" to="." method="_on_Forfeit_pressed"]

View File

@@ -1,6 +1,7 @@
[gd_scene load_steps=8 format=2]
[gd_scene load_steps=9 format=2]
[ext_resource path="res://assets/game/board_blue.png" type="Texture" id=1]
[ext_resource path="res://dark_theme.tres" type="Theme" id=2]
[ext_resource path="res://scenes/ships/3ShipB.tscn" type="PackedScene" id=4]
[ext_resource path="res://scenes/ships/3shipA.tscn" type="PackedScene" id=5]
[ext_resource path="res://scenes/ships/4Ship.tscn" type="PackedScene" id=6]
@@ -15,6 +16,7 @@ anchor_bottom = 0.890237
margin_top = -0.445435
margin_bottom = 39.5145
mouse_filter = 2
theme = ExtResource( 2 )
script = ExtResource( 10 )
__meta__ = {
"_edit_use_anchors_": false
@@ -70,20 +72,20 @@ contacts_reported = 1
contact_monitor = true
[node name="Confirm Placement" type="Button" parent="."]
margin_left = 409.0
margin_top = 331.0
margin_right = 543.0
margin_bottom = 351.0
margin_left = 417.0
margin_top = 316.0
margin_right = 608.0
margin_bottom = 340.0
text = "Confirm Placement"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Clear" type="Button" parent="."]
margin_left = 353.0
margin_top = 331.0
margin_right = 406.0
margin_bottom = 351.0
margin_left = 348.0
margin_top = 316.0
margin_right = 408.0
margin_bottom = 340.0
text = "Clear"
__meta__ = {
"_edit_use_anchors_": false

View File

@@ -1,24 +1,52 @@
[gd_scene load_steps=2 format=2]
[gd_scene load_steps=8 format=2]
[ext_resource path="res://assets/font/Minecraft.ttf" type="DynamicFontData" id=1]
[ext_resource path="res://script/options/Options.gd" type="Script" id=2]
[ext_resource path="res://light_theme.tres" type="Theme" id=3]
[sub_resource type="DynamicFont" id=1]
size = 44
outline_size = 2
outline_color = Color( 0, 0, 0, 1 )
font_data = ExtResource( 1 )
[sub_resource type="DynamicFont" id=2]
outline_size = 1
outline_color = Color( 0, 0, 0, 1 )
font_data = ExtResource( 1 )
[sub_resource type="DynamicFont" id=3]
outline_size = 1
outline_color = Color( 0, 0, 0, 1 )
font_data = ExtResource( 1 )
[sub_resource type="DynamicFont" id=4]
outline_size = 1
font_data = ExtResource( 1 )
[node name="Options" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
theme = ExtResource( 3 )
script = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="MenuLabel" type="RichTextLabel" parent="."]
margin_left = 294.0
margin_top = 68.0
margin_right = 346.0
margin_bottom = 83.0
custom_colors/default_color = Color( 0, 0, 0, 1 )
[node name="Options Label" type="Label" parent="."]
anchor_left = 0.5
anchor_right = 0.5
margin_left = -82.0
margin_top = 49.0
margin_right = 82.0
margin_bottom = 93.0
custom_fonts/font = SubResource( 1 )
custom_colors/font_color_shadow = Color( 0, 0, 0, 1 )
custom_constants/shadow_offset_y = 8
text = "Options"
align = 2
valign = 1
__meta__ = {
"_edit_lock_": true,
"_edit_use_anchors_": false
}
@@ -36,11 +64,11 @@ __meta__ = {
position = Vector2( 0, 8 )
[node name="Master Label" type="Label" parent="Sliders/Master Volume Setting"]
margin_left = -0.140289
margin_top = -8.0
margin_right = 63.8597
margin_bottom = 8.0
custom_colors/font_color = Color( 0, 0, 0, 1 )
margin_left = -8.14029
margin_top = -14.0
margin_right = 57.8597
margin_bottom = 10.0
custom_fonts/font = SubResource( 2 )
text = "Volume:"
align = 2
valign = 1
@@ -50,9 +78,9 @@ __meta__ = {
[node name="Master Slider" type="HSlider" parent="Sliders/Master Volume Setting"]
margin_left = 64.0
margin_top = -8.0
margin_top = -10.0
margin_right = 208.0
margin_bottom = 8.0
margin_bottom = 6.0
focus_neighbour_left = NodePath("../../../Back")
focus_neighbour_top = NodePath("../../../Back")
focus_neighbour_bottom = NodePath("../../Volume Setting/Volume Slider")
@@ -61,6 +89,7 @@ focus_previous = NodePath("../../../Back")
max_value = 1.0
step = 0.05
tick_count = 10
ticks_on_borders = true
__meta__ = {
"_edit_use_anchors_": false
}
@@ -69,10 +98,11 @@ __meta__ = {
position = Vector2( 0, 33 )
[node name="Music Label" type="Label" parent="Sliders/Music Volume Setting"]
margin_top = -8.0
margin_right = 64.0
margin_bottom = 8.0
custom_colors/font_color = Color( 0, 0, 0, 1 )
margin_left = -6.0
margin_top = -13.0
margin_right = 58.0
margin_bottom = 11.0
custom_fonts/font = SubResource( 3 )
text = "Music:"
align = 2
valign = 1
@@ -81,10 +111,10 @@ __meta__ = {
}
[node name="Music Slider" type="HSlider" parent="Sliders/Music Volume Setting"]
margin_left = 64.0
margin_top = -8.0
margin_right = 208.0
margin_bottom = 8.0
margin_left = 64.25
margin_top = -9.0
margin_right = 208.25
margin_bottom = 7.0
focus_neighbour_top = NodePath("../../SFX Setting/SFX Slider")
focus_neighbour_bottom = NodePath("../../../Buttons/Dark")
focus_next = NodePath("../../../Buttons/Dark")
@@ -92,6 +122,7 @@ focus_previous = NodePath("../../SFX Setting/SFX Slider")
max_value = 1.0
step = 0.05
tick_count = 10
ticks_on_borders = true
__meta__ = {
"_edit_use_anchors_": false
}
@@ -99,10 +130,11 @@ __meta__ = {
[node name="SFX Volume Setting" type="Node2D" parent="Sliders"]
[node name="SFX Label" type="Label" parent="Sliders/SFX Volume Setting"]
margin_top = 48.0
margin_right = 64.0
margin_bottom = 64.0
custom_colors/font_color = Color( 0, 0, 0, 1 )
margin_left = -6.0
margin_top = 46.0
margin_right = 58.0
margin_bottom = 70.0
custom_fonts/font = SubResource( 4 )
text = "SFX:"
align = 2
valign = 1
@@ -112,23 +144,27 @@ __meta__ = {
[node name="SFX Slider" type="HSlider" parent="Sliders/SFX Volume Setting"]
margin_left = 64.0
margin_top = 48.0
margin_top = 50.0
margin_right = 208.0
margin_bottom = 64.0
margin_bottom = 66.0
max_value = 1.0
step = 0.05
tick_count = 10
ticks_on_borders = true
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Buttons" type="HBoxContainer" parent="."]
margin_left = 216.0
margin_top = 200.0
margin_right = 424.0
margin_bottom = 224.0
anchor_left = 0.5
anchor_top = 0.498036
anchor_right = 0.5
anchor_bottom = 0.498036
margin_left = -102.0
margin_top = 30.7071
margin_right = 106.0
margin_bottom = 54.7071
__meta__ = {
"_edit_lock_": true,
"_edit_use_anchors_": false
}
@@ -157,8 +193,8 @@ text = "Dark Mode"
[node name="Back" type="Button" parent="."]
margin_left = 16.0
margin_top = 16.0
margin_right = 28.0
margin_bottom = 36.0
margin_right = 83.0
margin_bottom = 40.0
focus_neighbour_left = NodePath(".")
focus_neighbour_top = NodePath(".")
focus_neighbour_right = NodePath("../Sliders/SFX Setting/SFX Slider")
@@ -167,7 +203,6 @@ focus_next = NodePath("../Sliders/SFX Setting/SFX Slider")
focus_previous = NodePath(".")
text = "Back"
__meta__ = {
"_edit_lock_": true,
"_edit_use_anchors_": false
}

View File

@@ -1,5 +1,6 @@
[gd_scene load_steps=4 format=2]
[gd_scene load_steps=5 format=2]
[ext_resource path="res://light_theme.tres" type="Theme" id=1]
[ext_resource path="res://script/title screen/Title Screen.gd" type="Script" id=2]
[ext_resource path="res://assets/font/Minecraft.ttf" type="DynamicFontData" id=3]
@@ -12,6 +13,7 @@ font_data = ExtResource( 3 )
[node name="Title Node" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
theme = ExtResource( 1 )
script = ExtResource( 2 )
__meta__ = {
"_edit_use_anchors_": false
@@ -22,36 +24,36 @@ anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -68.077
margin_top = 10.0
margin_right = 68.077
margin_bottom = 102.0
margin_left = -80.0
margin_top = 11.0
margin_right = 80.0
margin_bottom = 119.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Singleplayer" type="Button" parent="VBoxContainer"]
margin_right = 136.0
margin_bottom = 20.0
margin_right = 160.0
margin_bottom = 24.0
focus_neighbour_top = NodePath("../Quit")
text = "Single Player"
[node name="Multiplayer" type="Button" parent="VBoxContainer"]
margin_top = 24.0
margin_right = 136.0
margin_bottom = 44.0
margin_top = 28.0
margin_right = 160.0
margin_bottom = 52.0
text = "Multiplayer"
[node name="Options" type="Button" parent="VBoxContainer"]
margin_top = 48.0
margin_right = 136.0
margin_bottom = 68.0
margin_top = 56.0
margin_right = 160.0
margin_bottom = 80.0
text = "Options"
[node name="Quit" type="Button" parent="VBoxContainer"]
margin_top = 72.0
margin_right = 136.0
margin_bottom = 92.0
margin_top = 84.0
margin_right = 160.0
margin_bottom = 108.0
focus_neighbour_bottom = NodePath("../Singleplayer")
text = "Quit"
@@ -61,9 +63,9 @@ anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -157.0
margin_top = -50.0
margin_top = -59.0
margin_right = 157.0
margin_bottom = -6.0
margin_bottom = -15.0
size_flags_stretch_ratio = 0.0
custom_fonts/font = SubResource( 1 )
custom_colors/font_outline_modulate = Color( 0, 0, 0, 1 )