diff --git a/fonts/Inter.ttc b/fonts/Inter.ttc new file mode 100644 index 0000000..eb1f583 Binary files /dev/null and b/fonts/Inter.ttc differ diff --git a/fonts/Inter.ttc.import b/fonts/Inter.ttc.import new file mode 100644 index 0000000..0655c7e --- /dev/null +++ b/fonts/Inter.ttc.import @@ -0,0 +1,34 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://bsnspwkhs2eap" +path="res://.godot/imported/Inter.ttc-66d76f800dedd3967228b370d7774514.fontdata" + +[deps] + +source_file="res://fonts/Inter.ttc" +dest_files=["res://.godot/imported/Inter.ttc-66d76f800dedd3967228b370d7774514.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=1 +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/fonts/InterVariable-Italic.ttf b/fonts/InterVariable-Italic.ttf new file mode 100644 index 0000000..5b358cd Binary files /dev/null and b/fonts/InterVariable-Italic.ttf differ diff --git a/fonts/InterVariable-Italic.ttf.import b/fonts/InterVariable-Italic.ttf.import new file mode 100644 index 0000000..70a0a39 --- /dev/null +++ b/fonts/InterVariable-Italic.ttf.import @@ -0,0 +1,34 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://cqs7f38j5u0j0" +path="res://.godot/imported/InterVariable-Italic.ttf-03e2504c45660d1cd4db6440fe572d25.fontdata" + +[deps] + +source_file="res://fonts/InterVariable-Italic.ttf" +dest_files=["res://.godot/imported/InterVariable-Italic.ttf-03e2504c45660d1cd4db6440fe572d25.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=1 +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/fonts/InterVariable.ttf b/fonts/InterVariable.ttf new file mode 100644 index 0000000..4ab79e0 Binary files /dev/null and b/fonts/InterVariable.ttf differ diff --git a/fonts/InterVariable.ttf.import b/fonts/InterVariable.ttf.import new file mode 100644 index 0000000..587da4d --- /dev/null +++ b/fonts/InterVariable.ttf.import @@ -0,0 +1,34 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://dej0q3v4q1bo8" +path="res://.godot/imported/InterVariable.ttf-e7612f6aa3b6b222ac8885ca7804ade8.fontdata" + +[deps] + +source_file="res://fonts/InterVariable.ttf" +dest_files=["res://.godot/imported/InterVariable.ttf-e7612f6aa3b6b222ac8885ca7804ade8.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +disable_embedded_bitmaps=true +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=1 +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/minimal_theme.tres b/minimal_theme.tres index b0d1a15..fdd12e6 100644 --- a/minimal_theme.tres +++ b/minimal_theme.tres @@ -1,555 +1,4 @@ -[gd_resource type="Theme" load_steps=54 format=3 uid="uid://bcibt73qths3g"] - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_fyay6"] -content_margin_left = 4.0 -content_margin_top = 4.0 -content_margin_right = 4.0 -content_margin_bottom = 4.0 -bg_color = Color(0.328528, 0.358011, 0.40715, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_n8od0"] -content_margin_left = 4.0 -content_margin_top = 4.0 -content_margin_right = 4.0 -content_margin_bottom = 4.0 -bg_color = Color(0.259199, 0.286724, 0.3326, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_2m50i"] -content_margin_left = 6.0 -content_margin_top = 4.0 -content_margin_right = 6.0 -content_margin_bottom = 4.0 -bg_color = Color(0.21, 0.24, 0.29, 1) -draw_center = false -border_width_left = 2 -border_width_top = 2 -border_width_right = 2 -border_width_bottom = 2 -border_color = Color(0.295323, 0.31729, 0.3539, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_g8l50"] -content_margin_left = 4.0 -content_margin_top = 4.0 -content_margin_right = 4.0 -content_margin_bottom = 4.0 -bg_color = Color(0.250023, 0.28099, 0.3326, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_pndtk"] -content_margin_left = 4.0 -content_margin_top = 4.0 -content_margin_right = 4.0 -content_margin_bottom = 4.0 -bg_color = Color(0.1974, 0.2256, 0.2726, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_th5jy"] -content_margin_left = 16.0 -content_margin_top = 4.0 -content_margin_right = 0.0 -content_margin_bottom = 4.0 -bg_color = Color(0.1722, 0.1968, 0.2378, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_yy0bd"] -content_margin_left = 8.0 -content_margin_top = 4.8 -content_margin_right = 8.0 -content_margin_bottom = 4.8 -bg_color = Color(0.285561, 0.311188, 0.3539, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_2vulq"] -content_margin_left = 8.0 -content_margin_top = 4.8 -content_margin_right = 8.0 -content_margin_bottom = 4.8 -bg_color = Color(0.319934, 0.348647, 0.3965, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_mpbwm"] -content_margin_left = 6.0 -content_margin_top = 4.0 -content_margin_right = 6.0 -content_margin_bottom = 4.0 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ncj7f"] -content_margin_left = 8.0 -content_margin_top = 6.0 -content_margin_right = 8.0 -content_margin_bottom = 6.0 -bg_color = Color(0.268374, 0.292459, 0.3326, 1) -border_color = Color(0.319934, 0.348647, 0.3965, 1) -border_blend = true -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_v2c1j"] - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_bfne4"] -content_margin_left = 8.0 -content_margin_top = 6.0 -content_margin_right = 8.0 -content_margin_bottom = 6.0 -bg_color = Color(0.319934, 0.348647, 0.3965, 1) -border_width_left = 1 -border_width_top = 1 -border_width_right = 1 -border_width_bottom = 1 -border_color = Color(0.354308, 0.386105, 0.4391, 1) -border_blend = true -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ffe6y"] -content_margin_left = 8.0 -content_margin_top = 6.0 -content_margin_right = 8.0 -content_margin_bottom = 6.0 -bg_color = Color(0.354308, 0.386105, 0.4391, 1) -border_width_left = 1 -border_width_top = 1 -border_width_right = 1 -border_width_bottom = 1 -border_color = Color(0.388682, 0.423564, 0.4817, 1) -border_blend = true -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_6walj"] -content_margin_left = 8.0 -content_margin_top = 6.0 -content_margin_right = 8.0 -content_margin_bottom = 6.0 -bg_color = Color(0.275798, 0.305086, 0.3539, 1) -border_width_left = 1 -border_width_top = 1 -border_width_right = 1 -border_width_bottom = 1 -border_color = Color(0.319934, 0.348647, 0.3965, 1) -border_blend = true -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_6gc6b"] -content_margin_left = 6.0 -content_margin_top = 2.0 -content_margin_right = 6.0 -content_margin_bottom = 2.0 -bg_color = Color(0.21, 0.24, 0.29, 1) -draw_center = false -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_nvlhq"] -content_margin_left = 8.0 -content_margin_top = 4.0 -content_margin_right = 8.0 -content_margin_bottom = 4.0 -bg_color = Color(0.1911, 0.2184, 0.2639, 1) -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_o4lbp"] -content_margin_left = 8.0 -content_margin_top = 4.0 -content_margin_right = 8.0 -content_margin_bottom = 4.0 -bg_color = Color(0.17535, 0.2004, 0.24215, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_uoqhw"] -content_margin_left = 0.0 -content_margin_top = 4.8 -content_margin_right = 0.0 -content_margin_bottom = 4.8 -bg_color = Color(0.259199, 0.286724, 0.3326, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_m70y3"] -content_margin_left = 6.0 -content_margin_top = 4.0 -content_margin_right = 6.0 -content_margin_bottom = 4.0 -bg_color = Color(0.319934, 0.348647, 0.3965, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_5kknp"] -content_margin_left = 6.0 -content_margin_top = 4.0 -content_margin_right = 6.0 -content_margin_bottom = 4.0 -bg_color = Color(0.285561, 0.311188, 0.3539, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_6omkk"] -content_margin_left = 4.0 -content_margin_top = 4.0 -content_margin_right = 4.0 -content_margin_bottom = 4.0 -bg_color = Color(0.1596, 0.1824, 0.2204, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_wgaex"] -content_margin_left = 4.0 -content_margin_top = 4.0 -content_margin_right = 4.0 -content_margin_bottom = 4.0 -bg_color = Color(0.1596, 0.1824, 0.2204, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_8y8hw"] -content_margin_left = 4.0 -content_margin_top = 4.0 -content_margin_right = 4.0 -content_margin_bottom = 4.0 -bg_color = Color(0.21, 0.24, 0.29, 1) -draw_center = false -border_width_left = 2 -border_width_top = 2 -border_width_right = 2 -border_width_bottom = 2 -border_color = Color(1, 1, 1, 0.07) - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_xfcx5"] -content_margin_left = 8.0 -content_margin_top = 6.0 -content_margin_right = 8.0 -content_margin_bottom = 6.0 -bg_color = Color(0, 0, 0, 0.3) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_vofr8"] -content_margin_left = 6.0 -content_margin_top = 4.0 -content_margin_right = 6.0 -content_margin_bottom = 4.0 -bg_color = Color(0.1785, 0.204, 0.2465, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 -expand_margin_left = 1.0 -expand_margin_top = 1.0 -expand_margin_right = 1.0 -expand_margin_bottom = 1.0 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_84rx5"] -content_margin_left = 6.0 -content_margin_top = 4.0 -content_margin_right = 6.0 -content_margin_bottom = 4.0 -bg_color = Color(0.1785, 0.204, 0.2465, 1) -draw_center = false -border_color = Color(1, 1, 1, 0) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 -expand_margin_left = 1.0 -expand_margin_top = 1.0 -expand_margin_right = 1.0 -expand_margin_bottom = 1.0 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_yq7t6"] -content_margin_left = 0.0 -content_margin_top = 0.0 -content_margin_right = 0.0 -content_margin_bottom = 0.0 -bg_color = Color(0.287121, 0.328138, 0.3965, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_4n35b"] -content_margin_left = 4.0 -content_margin_top = 2.0 -content_margin_right = 4.0 -content_margin_bottom = 2.0 -bg_color = Color(0.1785, 0.204, 0.2465, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_0rr50"] -content_margin_left = 4.0 -content_margin_top = 4.0 -content_margin_right = 4.0 -content_margin_bottom = 4.0 -bg_color = Color(1, 1, 1, 0.04) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_saief"] -content_margin_left = 8.0 -content_margin_top = 8.0 -content_margin_right = 8.0 -content_margin_bottom = 8.0 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_w4yjj"] -content_margin_left = 4.0 -content_margin_top = 4.0 -content_margin_right = 4.0 -content_margin_bottom = 4.0 -bg_color = Color(0.17535, 0.2004, 0.24215, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_wdwaf"] -content_margin_left = 8.0 -content_margin_top = 4.0 -content_margin_right = 8.0 -content_margin_bottom = 4.0 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_vps6v"] -content_margin_left = 8.0 -content_margin_top = 3.0 -content_margin_right = 8.0 -content_margin_bottom = 3.0 -bg_color = Color(0.1344, 0.1536, 0.1856, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_3fkrk"] -content_margin_left = 8.0 -content_margin_top = 3.0 -content_margin_right = 8.0 -content_margin_bottom = 3.0 -bg_color = Color(0.1596, 0.1824, 0.2204, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_unybh"] -content_margin_left = 8.0 -content_margin_top = 3.0 -content_margin_right = 8.0 -content_margin_bottom = 3.0 -bg_color = Color(0, 0, 0, 0.1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxLine" id="StyleBoxLine_ody4d"] -color = Color(0.242599, 0.268362, 0.3113, 1) -grow_begin = -6.0 -grow_end = -6.0 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_bscl1"] -content_margin_left = 9.6 -content_margin_top = 9.6 -content_margin_right = 9.6 -content_margin_bottom = 9.6 -bg_color = Color(0.16568, 0.1862, 0.2204, 1) - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_52p6q"] -content_margin_left = 9.6 -content_margin_top = 9.6 -content_margin_right = 9.6 -content_margin_bottom = 9.6 -bg_color = Color(0.16568, 0.1862, 0.2204, 1) -shadow_color = Color(0, 0, 0, 0.3) -shadow_size = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_5wxaw"] -content_margin_left = 4.0 -content_margin_top = 4.0 -content_margin_right = 4.0 -content_margin_bottom = 4.0 -bg_color = Color(0.13952, 0.1568, 0.1856, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 -expand_margin_top = 2.0 -expand_margin_bottom = 2.0 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_jerwe"] -content_margin_left = 4.0 -content_margin_top = 4.0 -content_margin_right = 4.0 -content_margin_bottom = 4.0 -bg_color = Color(0.292397, 0.323448, 0.3752, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 -expand_margin_top = 2.0 -expand_margin_bottom = 2.0 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_u1plv"] -content_margin_left = 6.0 -content_margin_top = 6.0 -content_margin_right = 6.0 -content_margin_bottom = 6.0 -bg_color = Color(0.1785, 0.204, 0.2465, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="PlaceholderTexture2D" id="PlaceholderTexture2D_6288g"] -size = Vector2(0, 0) - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_yaatb"] -content_margin_left = 14.0 -content_margin_top = 8.0 -content_margin_right = 14.0 -content_margin_bottom = 6.0 -bg_color = Color(0.21, 0.24, 0.29, 1) -border_width_top = 2 -border_color = Color(0.44, 0.73, 0.98, 1) - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_dv0ye"] -content_margin_left = 14.0 -content_margin_top = 8.0 -content_margin_right = 14.0 -content_margin_bottom = 6.0 -bg_color = Color(0.1785, 0.204, 0.2465, 1) -border_color = Color(0.44, 0.73, 0.98, 1) - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_8el8h"] -content_margin_left = 14.0 -content_margin_top = 8.0 -content_margin_right = 14.0 -content_margin_bottom = 6.0 -bg_color = Color(0.21, 0.24, 0.29, 1) -border_width_top = 2 -border_color = Color(0.25, 0.384259, 0.5, 1) - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_47qw1"] -content_margin_left = 14.0 -content_margin_top = 8.0 -content_margin_right = 14.0 -content_margin_bottom = 6.0 -bg_color = Color(1, 1, 1, 0) -border_color = Color(0.44, 0.73, 0.98, 1) - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_fbtpk"] -content_margin_left = 6.0 -content_margin_top = 6.0 -content_margin_right = 6.0 -content_margin_bottom = 6.0 -bg_color = Color(0.21, 0.24, 0.29, 1) - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_p7ig6"] -content_margin_left = 14.0 -content_margin_top = 8.0 -content_margin_right = 14.0 -content_margin_bottom = 6.0 -bg_color = Color(0.18795, 0.2148, 0.25955, 1) -border_width_top = 2 -border_color = Color(0.25, 0.384259, 0.5, 1) - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_c6asc"] -content_margin_left = 0.0 -content_margin_top = 0.0 -content_margin_right = 0.0 -content_margin_bottom = 0.0 -bg_color = Color(0.16568, 0.1862, 0.2204, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ovxqj"] -content_margin_left = 0.0 -content_margin_top = 0.0 -content_margin_right = 0.0 -content_margin_bottom = 0.0 -bg_color = Color(0.285561, 0.311188, 0.3539, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_kmb46"] -content_margin_left = 4.0 -content_margin_top = 4.0 -content_margin_right = 4.0 -content_margin_bottom = 4.0 -bg_color = Color(1, 1, 1, 0.04) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_p53la"] -content_margin_left = 4.0 -content_margin_top = 4.0 -content_margin_right = 4.0 -content_margin_bottom = 4.0 -bg_color = Color(0.1344, 0.1536, 0.1856, 1) -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 +[gd_resource type="Theme" load_steps=2 format=3 uid="uid://bcibt73qths3g"] [sub_resource type="GDScript" id="GDScript_hhmc0"] script/source = "@tool @@ -563,34 +12,50 @@ var dark_theme : bool func _init() -> void: # Editor Settings - var settings := EditorInterface.get_editor_settings() + var settings : EditorSettings = EditorInterface.get_editor_settings() - base_color = settings.get_setting('interface/theme/base_color') as Color - contrast = settings.get_setting('interface/theme/contrast') as float + @warning_ignore('unsafe_cast') + base_color = settings.get_setting('interface/theme/base_color') + @warning_ignore('unsafe_cast') + contrast = settings.get_setting('interface/theme/contrast') scale = EditorInterface.get_editor_scale() - var accent_color := settings.get_setting('interface/theme/accent_color') as Color - var base_spacing := settings.get_setting('interface/theme/base_spacing') as int - var extra_spacing := settings.get_setting('interface/theme/additional_spacing') as int - var corner_radius := settings.get_setting('interface/theme/corner_radius') as int - var icon_and_font_color := settings.get_setting('interface/theme/icon_and_font_color') as int - var relationship_line_opacity := settings.get_setting('interface/theme/relationship_line_opacity') as float - var draw_extra_borders := settings.get_setting('interface/theme/draw_extra_borders') as bool + @warning_ignore('unsafe_cast') + var accent_color : Color = settings.get_setting('interface/theme/accent_color') + @warning_ignore('unsafe_cast') + var base_spacing : int = settings.get_setting('interface/theme/base_spacing') + @warning_ignore('unsafe_cast') + var extra_spacing : int = settings.get_setting('interface/theme/additional_spacing') + @warning_ignore('unsafe_cast') + var corner_radius : int = settings.get_setting('interface/theme/corner_radius') + @warning_ignore('unsafe_cast') + var icon_and_font_color : int = settings.get_setting('interface/theme/icon_and_font_color') + @warning_ignore('unsafe_cast') + var relationship_line_opacity : float = settings.get_setting('interface/theme/relationship_line_opacity') + @warning_ignore('unsafe_cast') + var draw_extra_borders : bool = settings.get_setting('interface/theme/draw_extra_borders') + @warning_ignore('unsafe_cast') + var increase_scrollbar_touch_area : bool = settings.get_setting('interface/touchscreen/increase_scrollbar_touch_area') # Globals - var base_margin = base_spacing - var increased_margin = base_spacing + extra_spacing * 0.75 - var popup_margin = base_margin * 2.4 + base_spacing = maxi(base_spacing, 2) # Base spacing below 2 looks broken + + var base_margin : float = base_spacing + var increased_margin : float = base_spacing + extra_spacing * 0.75 + var popup_margin : float = maxf(base_margin * 2.4, 4.0 * scale) dark_theme = base_color.get_luminance() < 0.5 + var dark_theme_icon_and_font : bool = dark_theme + if icon_and_font_color != 0: # ColorMode.AUTO_COLOR - dark_theme = icon_and_font_color == 1 # ColorMode.DARK + dark_theme_icon_and_font = icon_and_font_color == 2 # ColorMode.LIGHT - var mono_color = Color.WHITE if dark_theme else Color.BLACK + var mono_color : Color = Color.WHITE if dark_theme else Color.BLACK + var mono_color_icon_and_font : Color = Color.WHITE if dark_theme_icon_and_font else Color.BLACK - var extra_border_color_1 = Color(1, 1, 1, 0.4) if dark_theme else Color(0, 0, 0, 0.4) - var extra_border_color_2 = Color(1, 1, 1, 0.2) if dark_theme else Color(0, 0, 0, 0.2) + var extra_border_color_1 : Color = Color(1, 1, 1, 0.4) if dark_theme else Color(0, 0, 0, 0.4) + var extra_border_color_2 : Color = Color(1, 1, 1, 0.2) if dark_theme else Color(0, 0, 0, 0.2) # Ensure minimum contrast with the light theme. The default # contrast makes it hard to see the UI elements @@ -598,56 +63,60 @@ func _init() -> void: contrast = -0.4 # Main stylebox that most styleboxes duplicate - var base_sb := StyleBoxFlat.new() + var base_sb : StyleBoxFlat = StyleBoxFlat.new() base_sb.bg_color = base_color base_sb.set_content_margin_all(base_margin * scale) - base_sb.set_corner_radius_all(corner_radius * scale) + base_sb.set_corner_radius_all(int(corner_radius * scale)) # Non-transparent buttons will potentially blend worse with background # than transparent ones, however this is currently only noticeable on the Close # button of editor settings, and it probably shouldn't even exist - var button_sb := base_sb.duplicate() + var button_sb : StyleBoxFlat = base_sb.duplicate() button_sb.bg_color = _get_base_color(0.3, 0.8) if draw_extra_borders: - _set_border(button_sb, extra_border_color_1, floor(scale)) + _set_border(button_sb, extra_border_color_1, floorf(scale)) else: _set_border(button_sb, _get_base_color(0.5, 0.7), 1, true) _set_margin(button_sb, base_margin * 2, base_margin * 1.5, base_margin * 2, base_margin * 1.5) - var button_hover_sb := button_sb.duplicate() + var button_hover_sb : StyleBoxFlat = button_sb.duplicate() button_hover_sb.bg_color = _get_base_color(0.5, 0.7) if draw_extra_borders: - _set_border(button_hover_sb, extra_border_color_1, floor(scale)) + _set_border(button_hover_sb, extra_border_color_1, floorf(scale)) else: _set_border(button_hover_sb, _get_base_color(0.7, 0.7), 1, true) - var button_pressed_sb := button_sb.duplicate() + var button_pressed_sb : StyleBoxFlat = button_sb.duplicate() button_pressed_sb.bg_color = _get_base_color(0.7, 0.7) if draw_extra_borders: - _set_border(button_pressed_sb, extra_border_color_1, floor(scale)) + _set_border(button_pressed_sb, extra_border_color_1, floorf(scale)) else: _set_border(button_pressed_sb, _get_base_color(0.9, 0.7), 1, true) - var button_disabled_sb := button_sb.duplicate() + var button_disabled_sb : StyleBoxFlat = button_sb.duplicate() button_disabled_sb.set_border_width_all(0) button_disabled_sb.bg_color = _get_base_color(0.2, 0.7) if draw_extra_borders: - _set_border(button_disabled_sb, extra_border_color_2 * Color(1, 1, 1, 0.5), floor(scale)) + _set_border(button_disabled_sb, extra_border_color_2 * Color(1, 1, 1, 0.5), floorf(scale)) - var flat_button_hover_sb := base_sb.duplicate() + var flat_button_hover_sb : StyleBoxFlat = base_sb.duplicate() _set_margin(flat_button_hover_sb, base_margin * 1.5, base_margin, base_margin * 1.5, base_margin) flat_button_hover_sb.bg_color = _get_base_color(0.3, 0.7) if draw_extra_borders: - _set_border(flat_button_hover_sb, extra_border_color_1, floor(scale)) + _set_border(flat_button_hover_sb, extra_border_color_1, floorf(scale)) - var flat_button_pressed_sb := flat_button_hover_sb.duplicate() + var flat_button_pressed_sb : StyleBoxFlat = flat_button_hover_sb.duplicate() flat_button_pressed_sb.bg_color = _get_base_color(0.5, 0.7) - var empty_sb := StyleBoxEmpty.new() - var empty_margin_sb := StyleBoxEmpty.new() - empty_margin_sb.set_content_margin_all(base_margin * 2 * scale) - var empty_wide_sb := StyleBoxEmpty.new() - _set_margin(empty_wide_sb, base_margin * 1.5, base_margin, base_margin * 1.5, base_margin) + var base_empty_sb : StyleBoxFlat = base_sb.duplicate() + base_empty_sb.draw_center = false + base_empty_sb.set_content_margin_all(0) + + var base_empty_wide_sb : StyleBoxFlat = base_sb.duplicate() + base_empty_wide_sb.draw_center = false + # Ensure minimum margin for wide flat buttons otherwise the topbar looks broken + var base_empty_wide_margin : float = maxf(base_margin, 3.0) + _set_margin(base_empty_wide_sb, base_empty_wide_margin * 1.5, base_empty_wide_margin, base_empty_wide_margin * 1.5, base_empty_wide_margin) # Animation editor @@ -656,23 +125,23 @@ func _init() -> void: set_color('track_focus_color', 'AnimationBezierTrackEdit', mono_color * Color(1, 1, 1, 0.1)) set_color('v_line_color', 'AnimationBezierTrackEdit', Color.TRANSPARENT) - set_color('font_primary_color', 'AnimationTimelineEdit', mono_color * Color(1, 1, 1, 0.7)) - set_color('font_secondary_color', 'AnimationTimelineEdit', mono_color * Color(1, 1, 1, 0.4)) + set_color('font_primary_color', 'AnimationTimelineEdit', mono_color_icon_and_font * Color(1, 1, 1, 0.7)) + set_color('font_secondary_color', 'AnimationTimelineEdit', mono_color_icon_and_font * Color(1, 1, 1, 0.4)) set_color('h_line_color', 'AnimationTimelineEdit', Color.TRANSPARENT) set_color('v_line_primary_color', 'AnimationTimelineEdit', mono_color * Color(1, 1, 1, 0.4)) set_color('v_line_secondary_color', 'AnimationTimelineEdit', mono_color * Color(1, 1, 1, 0.08)) - set_constant('text_primary_margin', 'AnimationTimelineEdit', base_margin * 0.75 * scale) - set_constant('text_secondary_margin', 'AnimationTimelineEdit', base_margin * 0.5 * scale) - set_constant('v_line_primary_margin', 'AnimationTimelineEdit', base_margin * scale) - set_constant('v_line_primary_width', 'AnimationTimelineEdit', ceil(2 * scale)) - set_constant('v_line_secondary_margin', 'AnimationTimelineEdit', base_margin * 1.5 * scale) - set_constant('v_line_secondary_width', 'AnimationTimelineEdit', ceil(scale)) + set_constant('text_primary_margin', 'AnimationTimelineEdit', int(base_margin * 0.75 * scale)) + set_constant('text_secondary_margin', 'AnimationTimelineEdit', int(base_margin * 0.5 * scale)) + set_constant('v_line_primary_margin', 'AnimationTimelineEdit', int(base_margin * scale)) + set_constant('v_line_primary_width', 'AnimationTimelineEdit', int(ceilf(2 * scale))) + set_constant('v_line_secondary_margin', 'AnimationTimelineEdit', int(base_margin * 1.5 * scale)) + set_constant('v_line_secondary_width', 'AnimationTimelineEdit', int(ceilf(scale))) - var sb = base_sb.duplicate() + var sb : StyleBoxFlat = base_sb.duplicate() sb.bg_color = _get_base_color(0.55, 0.7) if draw_extra_borders: - _set_border(sb, extra_border_color_1, floor(scale)) + _set_border(sb, extra_border_color_1, floorf(scale)) set_stylebox('time_available', 'AnimationTimelineEdit', sb) sb = base_sb.duplicate() @@ -680,7 +149,7 @@ func _init() -> void: set_stylebox('time_unavailable', 'AnimationTimelineEdit', sb) set_color('h_line_color', 'AnimationTrackEdit', Color.TRANSPARENT) - set_constant('h_separation', 'AnimationTrackEdit', base_margin * 1.5 * scale) + set_constant('h_separation', 'AnimationTrackEdit', int(base_margin * 1.5 * scale)) sb = base_sb.duplicate() sb.draw_center = false @@ -699,7 +168,7 @@ func _init() -> void: set_color('bg_color', 'AnimationTrackEditGroup', _get_base_color(-0.2)) set_color('h_line_color', 'AnimationTrackEditGroup', Color.TRANSPARENT) set_color('v_line_color', 'AnimationTrackEditGroup', Color.TRANSPARENT) - set_constant('h_separation', 'AnimationTrackEditGroup', base_margin * 2 * scale) + set_constant('h_separation', 'AnimationTrackEditGroup', int(base_margin * 2 * scale)) sb = base_sb.duplicate() sb.bg_color = _get_base_color(-0.6) @@ -709,9 +178,9 @@ func _init() -> void: # Bottom panel # Use bigger margin for buttons in bottom panel to make them easier to press - sb = empty_sb.duplicate() - _set_margin(sb, base_margin * 2, base_margin * 1.2, base_margin * 2, base_margin * 1.2) - set_stylebox('normal', 'BottomPanelButton', empty_wide_sb) + var empty_sb : StyleBoxFlat = base_empty_sb.duplicate() + _set_margin(empty_sb, base_margin * 2, base_margin * 1.2, base_margin * 2, base_margin * 1.2) + set_stylebox('normal', 'BottomPanelButton', base_empty_wide_sb) sb = flat_button_hover_sb.duplicate() _set_margin(sb, base_margin * 2, base_margin * 1.2, base_margin * 2, base_margin * 1.2) @@ -722,20 +191,30 @@ func _init() -> void: _set_margin(sb, base_margin * 2, base_margin * 1.2, base_margin * 2, base_margin * 1.2) set_stylebox('hover_pressed', 'BottomPanelButton', sb) + # Audio Bus + + sb = base_sb.duplicate() + sb.bg_color = _get_base_color(0.2, 0.7) + set_stylebox('normal', 'EditorAudioBus', sb) + set_stylebox('focus', 'EditorAudioBus', sb) + sb = base_sb.duplicate() + sb.bg_color = _get_base_color(0.35, 0.7) + set_stylebox('master', 'EditorAudioBus', sb) + # Button - set_color('font_color', 'Button', mono_color * Color(1, 1, 1, 0.7)) - set_color('font_disabled_color', 'Button', mono_color * Color(1, 1, 1, 0.3)) - set_color('font_focus_color', 'Button', mono_color) - set_color('font_hover_color', 'Button', mono_color) - set_color('font_hover_pressed_color', 'Button', mono_color) - set_color('font_pressed_color', 'Button', mono_color) - set_color('icon_disabled_color', 'Button', mono_color * Color(1, 1, 1, 0.3)) - set_color('icon_normal_color', 'Button', mono_color * Color(1, 1, 1, 0.7)) + set_color('font_color', 'Button', mono_color_icon_and_font * Color(1, 1, 1, 0.7)) + set_color('font_disabled_color', 'Button', mono_color_icon_and_font * Color(1, 1, 1, 0.3)) + set_color('font_focus_color', 'Button', mono_color_icon_and_font) + set_color('font_hover_color', 'Button', mono_color_icon_and_font) + set_color('font_hover_pressed_color', 'Button', mono_color_icon_and_font) + set_color('font_pressed_color', 'Button', mono_color_icon_and_font) + set_color('icon_disabled_color', 'Button', mono_color_icon_and_font * Color(1, 1, 1, 0.3)) + set_color('icon_normal_color', 'Button', mono_color_icon_and_font * Color(1, 1, 1, 0.7)) set_constant('outline_size', 'Button', 0) set_stylebox('disabled', 'Button', button_disabled_sb) set_stylebox('disabled_mirrored', 'Button', button_disabled_sb) - set_stylebox('focus', 'Button', empty_sb) + set_stylebox('focus', 'Button', base_empty_sb) set_stylebox('hover', 'Button', button_hover_sb) set_stylebox('hover_mirrored', 'Button', button_hover_sb) set_stylebox('hover_pressed', 'Button', button_pressed_sb) @@ -747,8 +226,8 @@ func _init() -> void: # Checkbox - set_color('font_hover_pressed_color', 'CheckBox', mono_color) - set_color('font_pressed_color', 'CheckBox', mono_color * Color(1, 1, 1, 0.7)) + set_color('font_hover_pressed_color', 'CheckBox', mono_color_icon_and_font) + set_color('font_pressed_color', 'CheckBox', mono_color_icon_and_font * Color(1, 1, 1, 0.7)) sb = base_sb.duplicate() sb.draw_center = false @@ -758,9 +237,9 @@ func _init() -> void: # CheckButton - set_color('font_focus_color', 'CheckButton', mono_color * Color(1, 1, 1, 0.7)) - set_color('font_hover_pressed_color', 'CheckButton', mono_color) - set_color('font_pressed_color', 'CheckButton', mono_color * Color(1, 1, 1, 0.7)) + set_color('font_focus_color', 'CheckButton', mono_color_icon_and_font * Color(1, 1, 1, 0.7)) + set_color('font_hover_pressed_color', 'CheckButton', mono_color_icon_and_font) + set_color('font_pressed_color', 'CheckButton', mono_color_icon_and_font * Color(1, 1, 1, 0.7)) # Editor @@ -769,19 +248,21 @@ func _init() -> void: set_color('box_selection_stroke_color', 'Editor', mono_color * Color(1, 1, 1, 0.4)) # Ruler in 2D view: set_color('dark_color_2', 'Editor', Color(0, 0, 0, 0.3) if dark_theme else Color(1, 1, 1, 0.3)) + # Shortcut tree cell background: + set_color('dark_color_3', 'Editor', _get_base_color(-0.6)) set_color('forward_plus_color', 'Editor', Color(0.54902, 0.752941, 0.392157)) set_color('gl_compatibility_color', 'Editor', Color(0.447059, 0.698039, 0.890196)) set_color('mobile_color', 'Editor', Color(0.862745, 0.482353, 0.584314)) - set_color('property_color_w', 'Editor', mono_color * Color(1, 1, 1, 0.8)) - set_color('property_color_x', 'Editor', Color('#E16277') if dark_theme else Color('#670A18')) - set_color('property_color_y', 'Editor', Color('#C3EF65') if dark_theme else Color('#455E10')) - set_color('property_color_z', 'Editor', Color('#6AABF6') if dark_theme else Color('#143862')) - set_color('warning_color', 'Editor', Color(0.95, 0.855, 0.57) if dark_theme else Color(0.82, 0.56, 0.1)) + set_color('property_color_w', 'Editor', mono_color_icon_and_font * Color(1, 1, 1, 0.8)) + set_color('property_color_x', 'Editor', Color('#E16277') if dark_theme_icon_and_font else Color('#670A18')) + set_color('property_color_y', 'Editor', Color('#C3EF65') if dark_theme_icon_and_font else Color('#455E10')) + set_color('property_color_z', 'Editor', Color('#6AABF6') if dark_theme_icon_and_font else Color('#143862')) + set_color('warning_color', 'Editor', Color('#D4C79F') if dark_theme_icon_and_font else Color('#D47D03')) set_color('prop_subsection', 'Editor', Color.TRANSPARENT) - set_constant('top_bar_separation', 'Editor', base_margin * scale) - set_constant('window_border_margin', 'Editor', base_margin * scale) + set_constant('top_bar_separation', 'Editor', int(base_margin * scale)) + set_constant('window_border_margin', 'Editor', int(base_margin * scale)) # EditorHelpBit @@ -789,52 +270,55 @@ func _init() -> void: sb.bg_color = _get_base_color(-0.3 if dark_theme else -0.7) _set_margin(sb, base_margin * 2, base_margin, base_margin * 2, base_margin) sb.set_corner_radius_all(0) - sb.corner_radius_bottom_right = corner_radius * scale - sb.corner_radius_bottom_left = corner_radius * scale + sb.corner_radius_bottom_right = int(corner_radius * scale) + sb.corner_radius_bottom_left = int(corner_radius * scale) if draw_extra_borders: - _set_border(sb, extra_border_color_2, floor(scale)) + _set_border(sb, extra_border_color_2, floorf(scale)) set_stylebox('normal', 'EditorHelpBitContent', sb) sb = base_sb.duplicate() sb.bg_color = _get_base_color(-0.55 if dark_theme else -0.9) # Same as secondary tree _set_margin(sb, base_margin * 2, base_margin, base_margin * 2, base_margin) sb.set_corner_radius_all(0) - sb.corner_radius_top_right = corner_radius * scale - sb.corner_radius_top_left = corner_radius * scale + sb.corner_radius_top_right = int(corner_radius * scale) + sb.corner_radius_top_left = int(corner_radius * scale) if draw_extra_borders: - _set_border(sb, extra_border_color_2, floor(scale)) + _set_border(sb, extra_border_color_2, floorf(scale)) set_stylebox('normal', 'EditorHelpBitTitle', sb) # EditorInspector - set_constant('v_separation', 'EditorInspector', base_margin * 0.85 * scale) + empty_sb = base_empty_sb.duplicate() + empty_sb.set_content_margin_all(base_margin * 2 * scale) + set_stylebox('panel', 'EditorInspector', empty_sb) + set_constant('v_separation', 'EditorInspector', int(base_margin * 0.85 * scale)) sb = base_sb.duplicate() sb.bg_color = _get_base_color(0.2, 0.8) _set_margin(sb, 0, base_margin * 1.2, 0, base_margin * 1.2) if draw_extra_borders: - _set_border(sb, extra_border_color_2, floor(scale)) + _set_border(sb, extra_border_color_2, floorf(scale)) set_stylebox('bg', 'EditorInspectorCategory', sb) - set_constant('h_separation', 'EditorInspectorSection', base_margin * scale) + set_constant('h_separation', 'EditorInspectorSection', int(base_margin * scale)) # EditorLogFilterButton # Hover and pressed styles are swapped for toggle buttons on purpose set_stylebox('hover', 'EditorLogFilterButton', flat_button_pressed_sb) set_stylebox('pressed', 'EditorLogFilterButton', flat_button_hover_sb) - set_stylebox('normal', 'EditorLogFilterButton', empty_sb) + set_stylebox('normal', 'EditorLogFilterButton', base_empty_sb) # EditorProperty - set_color('property_color', 'EditorProperty', mono_color * Color(1, 1, 1, 0.6)) - set_color('warning_color', 'EditorProperty', Color(0.95, 0.855, 0.57, 1) if dark_theme else Color(0.82, 0.56, 0.1)) - set_stylebox('bg', 'EditorProperty', empty_sb) - set_stylebox('bg_selected', 'EditorProperty', empty_sb) + set_color('property_color', 'EditorProperty', mono_color_icon_and_font * Color(1, 1, 1, 0.6)) + set_color('warning_color', 'EditorProperty', get_color('warning_color', 'Editor')) + set_stylebox('bg', 'EditorProperty', base_empty_sb) + set_stylebox('bg_selected', 'EditorProperty', base_empty_sb) sb = base_sb.duplicate() sb.bg_color = _get_base_color(-0.8) # Same as LineEdit normal sb.set_content_margin_all(base_margin * scale) if draw_extra_borders: - _set_border(sb, extra_border_color_2, floor(scale)) + _set_border(sb, extra_border_color_2, floorf(scale)) set_stylebox('child_bg', 'EditorProperty', sb) # EditorSpinSlider @@ -890,19 +374,19 @@ func _init() -> void: # FlatButton - set_color('font_color', 'FlatButton', mono_color * Color(1, 1, 1, 0.7)) - set_color('font_disabled_color', 'FlatButton', mono_color * Color(1, 1, 1, 0.3)) - set_color('font_focus_color', 'FlatButton', mono_color) - set_color('font_hover_color', 'FlatButton', mono_color) - set_color('font_hover_pressed_color', 'FlatButton', mono_color) - set_color('font_pressed_color', 'FlatButton', mono_color) - set_color('icon_disabled_color', 'FlatButton', mono_color * Color(1, 1, 1, 0.3)) - set_color('icon_normal_color', 'FlatButton', mono_color * Color(1, 1, 1, 0.7)) + set_color('font_color', 'FlatButton', mono_color_icon_and_font * Color(1, 1, 1, 0.7)) + set_color('font_disabled_color', 'FlatButton', mono_color_icon_and_font * Color(1, 1, 1, 0.3)) + set_color('font_focus_color', 'FlatButton', mono_color_icon_and_font) + set_color('font_hover_color', 'FlatButton', mono_color_icon_and_font) + set_color('font_hover_pressed_color', 'FlatButton', mono_color_icon_and_font) + set_color('font_pressed_color', 'FlatButton', mono_color_icon_and_font) + set_color('icon_disabled_color', 'FlatButton', mono_color_icon_and_font * Color(1, 1, 1, 0.3)) + set_color('icon_normal_color', 'FlatButton', mono_color_icon_and_font * Color(1, 1, 1, 0.7)) - set_stylebox('disabled', 'FlatButton', empty_wide_sb) - set_stylebox('disabled_mirrored', 'FlatButton', empty_wide_sb) - set_stylebox('normal', 'FlatButton', empty_wide_sb) - set_stylebox('normal_mirrored', 'FlatButton', empty_wide_sb) + set_stylebox('disabled', 'FlatButton', base_empty_wide_sb) + set_stylebox('disabled_mirrored', 'FlatButton', base_empty_wide_sb) + set_stylebox('normal', 'FlatButton', base_empty_wide_sb) + set_stylebox('normal_mirrored', 'FlatButton', base_empty_wide_sb) set_stylebox('hover', 'FlatButton', flat_button_hover_sb) set_stylebox('hover_mirrored', 'FlatButton', flat_button_hover_sb) set_stylebox('hover_pressed', 'FlatButton', flat_button_pressed_sb) @@ -910,23 +394,22 @@ func _init() -> void: set_stylebox('pressed', 'FlatButton', flat_button_pressed_sb) set_stylebox('pressed_mirrored', 'FlatButton', flat_button_pressed_sb) - # FlatMenuButton - set_color('font_color', 'FlatMenuButton', mono_color * Color(1, 1, 1, 0.7)) - set_color('font_disabled_color', 'FlatMenuButton', mono_color * Color(1, 1, 1, 0.3)) - set_color('font_focus_color', 'FlatMenuButton', mono_color) - set_color('font_hover_color', 'FlatMenuButton', mono_color) - set_color('font_hover_pressed_color', 'FlatMenuButton', mono_color) - set_color('font_pressed_color', 'FlatMenuButton', mono_color) - set_color('icon_disabled_color', 'FlatMenuButton', mono_color * Color(1, 1, 1, 0.3)) - set_color('icon_normal_color', 'FlatMenuButton', mono_color * Color(1, 1, 1, 0.7)) + set_color('font_color', 'FlatMenuButton', mono_color_icon_and_font * Color(1, 1, 1, 0.7)) + set_color('font_disabled_color', 'FlatMenuButton', mono_color_icon_and_font * Color(1, 1, 1, 0.3)) + set_color('font_focus_color', 'FlatMenuButton', mono_color_icon_and_font) + set_color('font_hover_color', 'FlatMenuButton', mono_color_icon_and_font) + set_color('font_hover_pressed_color', 'FlatMenuButton', mono_color_icon_and_font) + set_color('font_pressed_color', 'FlatMenuButton', mono_color_icon_and_font) + set_color('icon_disabled_color', 'FlatMenuButton', mono_color_icon_and_font * Color(1, 1, 1, 0.3)) + set_color('icon_normal_color', 'FlatMenuButton', mono_color_icon_and_font * Color(1, 1, 1, 0.7)) - set_stylebox('disabled', 'FlatMenuButton', empty_wide_sb) - set_stylebox('disabled_mirrored', 'FlatMenuButton', empty_wide_sb) - set_stylebox('focus', 'FlatMenuButton', empty_wide_sb) - set_stylebox('normal', 'FlatMenuButton', empty_wide_sb) - set_stylebox('normal_mirrored', 'FlatMenuButton', empty_wide_sb) + set_stylebox('disabled', 'FlatMenuButton', base_empty_wide_sb) + set_stylebox('disabled_mirrored', 'FlatMenuButton', base_empty_wide_sb) + set_stylebox('focus', 'FlatMenuButton', base_empty_wide_sb) + set_stylebox('normal', 'FlatMenuButton', base_empty_wide_sb) + set_stylebox('normal_mirrored', 'FlatMenuButton', base_empty_wide_sb) set_stylebox('hover', 'FlatMenuButton', flat_button_hover_sb) set_stylebox('hover_mirrored', 'FlatMenuButton', flat_button_hover_sb) set_stylebox('hover_pressed', 'FlatMenuButton', flat_button_pressed_sb) @@ -940,22 +423,22 @@ func _init() -> void: # Box Containers - set_constant('separation', 'HBoxContainer', 2 * scale) - set_constant('separation', 'VBoxContainer', 2 * scale) + set_constant('separation', 'HBoxContainer', int(2 * scale)) + set_constant('separation', 'VBoxContainer', int(2 * scale)) # Split Containers set_constant('autohide', 'HSplitContainer', 1) - set_constant('minimum_grab_thickness', 'HSplitContainer', base_margin * 1.5 * scale) - set_constant('separation', 'HSplitContainer', ceil(2 * scale)) + set_constant('minimum_grab_thickness', 'HSplitContainer', int(base_margin * 1.5 * scale)) + set_constant('separation', 'HSplitContainer', int(ceilf(2 * scale))) set_constant('autohide', 'VSplitContainer', 1) - set_constant('minimum_grab_thickness', 'VSplitContainer', base_margin * 1.5 * scale) - set_constant('separation', 'VSplitContainer', ceil(2 * scale)) + set_constant('minimum_grab_thickness', 'VSplitContainer', int(base_margin * 1.5 * scale)) + set_constant('separation', 'VSplitContainer', int(ceilf(2 * scale))) # InspectorActionButton - set_constant('h_separation', 'InspectorActionButton', base_margin * 2 * scale) + set_constant('h_separation', 'InspectorActionButton', int(base_margin * 2 * scale)) set_stylebox('disabled', 'InspectorActionButton', button_disabled_sb) set_stylebox('disabled_mirrored', 'InspectorActionButton', button_disabled_sb) set_stylebox('normal', 'InspectorActionButton', button_sb) @@ -968,13 +451,13 @@ func _init() -> void: # ItemList set_color('guide_color', 'ItemList', Color.TRANSPARENT) - set_constant('v_separation', 'ItemList', base_margin * 1.5 * scale) + set_constant('v_separation', 'ItemList', int(base_margin * 1.5 * scale)) sb = base_sb.duplicate() sb.bg_color = mono_color * Color(1, 1, 1, 0.04) set_stylebox('cursor', 'ItemList', sb) set_stylebox('cursor_unfocused', 'ItemList', sb) - set_stylebox('focus', 'ItemList', empty_sb) + set_stylebox('focus', 'ItemList', base_empty_sb) set_stylebox('hovered', 'ItemList', flat_button_hover_sb) set_stylebox('selected', 'ItemList', flat_button_hover_sb) @@ -982,25 +465,27 @@ func _init() -> void: set_stylebox('hovered_selected', 'ItemList', flat_button_hover_sb) set_stylebox('hovered_selected_focus', 'ItemList', flat_button_hover_sb) - set_stylebox('panel', 'ItemList', empty_margin_sb) + sb = base_sb.duplicate() + sb.set_content_margin_all(base_margin * 2 * scale) + set_stylebox('panel', 'ItemList', sb) # Label - set_color('font_color', 'Label', mono_color * Color(1, 1, 1, 0.7)) + set_color('font_color', 'Label', mono_color_icon_and_font * Color(1, 1, 1, 0.7)) - sb = empty_sb.duplicate() + empty_sb = base_empty_sb.duplicate() # Keeping vertical margin low otherwise quick open looks bad - _set_margin(sb, base_margin * 2, base_margin, base_margin * 2, base_margin) - set_stylebox('normal', 'Label', sb) + _set_margin(empty_sb, base_margin * 2, base_margin, base_margin * 2, base_margin) + set_stylebox('normal', 'Label', empty_sb) # LineEdit and TextEdit - set_color('font_placeholder_color', 'LineEdit', mono_color * Color(1, 1, 1, 0.4)) + set_color('font_placeholder_color', 'LineEdit', mono_color_icon_and_font * Color(1, 1, 1, 0.4)) sb = base_sb.duplicate() - sb.bg_color = _get_base_color(-1.2 if dark_theme else -2) + sb.bg_color = _get_base_color(-1.2 if dark_theme else -2.0) if draw_extra_borders: - _set_border(sb, extra_border_color_1, floor(scale)) + _set_border(sb, extra_border_color_1, floorf(scale)) _set_margin(sb, base_margin * 2, base_margin * 0.75, base_margin * 2, base_margin * 0.75) set_stylebox('focus', 'LineEdit', sb) set_stylebox('focus', 'TextEdit', sb) @@ -1018,29 +503,29 @@ func _init() -> void: # MainMenuBar - set_stylebox('normal', 'MainMenuBar', empty_wide_sb) + set_stylebox('normal', 'MainMenuBar', base_empty_wide_sb) set_stylebox('hover', 'MainMenuBar', flat_button_hover_sb) set_stylebox('hover_pressed', 'MainMenuBar', flat_button_pressed_sb) set_stylebox('pressed', 'MainMenuBar', flat_button_pressed_sb) # MainScreenButton - set_stylebox('normal', 'MainScreenButton', empty_wide_sb) - set_stylebox('normal_mirrored', 'MainScreenButton', empty_wide_sb) - set_stylebox('hover', 'MainScreenButton', empty_wide_sb) - set_stylebox('hover_mirrored', 'MainScreenButton', empty_wide_sb) - set_stylebox('hover_pressed', 'MainScreenButton', empty_wide_sb) - set_stylebox('hover_pressed_mirrored', 'MainScreenButton', empty_wide_sb) - set_stylebox('pressed', 'MainScreenButton', empty_wide_sb) - set_stylebox('pressed_mirrored', 'MainScreenButton', empty_wide_sb) + set_stylebox('normal', 'MainScreenButton', base_empty_wide_sb) + set_stylebox('normal_mirrored', 'MainScreenButton', base_empty_wide_sb) + set_stylebox('hover', 'MainScreenButton', base_empty_wide_sb) + set_stylebox('hover_mirrored', 'MainScreenButton', base_empty_wide_sb) + set_stylebox('hover_pressed', 'MainScreenButton', base_empty_wide_sb) + set_stylebox('hover_pressed_mirrored', 'MainScreenButton', base_empty_wide_sb) + set_stylebox('pressed', 'MainScreenButton', base_empty_wide_sb) + set_stylebox('pressed_mirrored', 'MainScreenButton', base_empty_wide_sb) # MenuButton - set_stylebox('disabled', 'MenuButton', empty_wide_sb) - set_stylebox('disabled_mirrored', 'MenuButton', empty_wide_sb) - set_stylebox('focus', 'MenuButton', empty_wide_sb) - set_stylebox('normal', 'MenuButton', empty_wide_sb) - set_stylebox('normal_mirrored', 'MenuButton', empty_wide_sb) + set_stylebox('disabled', 'MenuButton', base_empty_wide_sb) + set_stylebox('disabled_mirrored', 'MenuButton', base_empty_wide_sb) + set_stylebox('focus', 'MenuButton', base_empty_wide_sb) + set_stylebox('normal', 'MenuButton', base_empty_wide_sb) + set_stylebox('normal_mirrored', 'MenuButton', base_empty_wide_sb) set_stylebox('pressed', 'MenuButton', flat_button_pressed_sb) set_stylebox('pressed_mirrored', 'MenuButton', flat_button_pressed_sb) set_stylebox('hover', 'MenuButton', flat_button_hover_sb) @@ -1050,20 +535,20 @@ func _init() -> void: # OptionButton - set_constant('arrow_margin', 'OptionButton', base_margin * 3.5) + set_constant('arrow_margin', 'OptionButton', int(base_margin * 3.5)) - set_color('font_color', 'OptionButton', mono_color * Color(1, 1, 1, 0.7)) - set_color('font_disabled_color', 'OptionButton', mono_color * Color(1, 1, 1, 0.3)) - set_color('font_focus_color', 'OptionButton', mono_color) - set_color('font_hover_color', 'OptionButton', mono_color) - set_color('font_hover_pressed_color', 'OptionButton', mono_color) - set_color('font_pressed_color', 'OptionButton', mono_color) - set_color('icon_disabled_color', 'OptionButton', mono_color * Color(1, 1, 1, 0.3)) - set_color('icon_normal_color', 'OptionButton', mono_color * Color(1, 1, 1, 0.7)) + set_color('font_color', 'OptionButton', mono_color_icon_and_font * Color(1, 1, 1, 0.7)) + set_color('font_disabled_color', 'OptionButton', mono_color_icon_and_font * Color(1, 1, 1, 0.3)) + set_color('font_focus_color', 'OptionButton', mono_color_icon_and_font) + set_color('font_hover_color', 'OptionButton', mono_color_icon_and_font) + set_color('font_hover_pressed_color', 'OptionButton', mono_color_icon_and_font) + set_color('font_pressed_color', 'OptionButton', mono_color_icon_and_font) + set_color('icon_disabled_color', 'OptionButton', mono_color_icon_and_font * Color(1, 1, 1, 0.3)) + set_color('icon_normal_color', 'OptionButton', mono_color_icon_and_font * Color(1, 1, 1, 0.7)) set_stylebox('disabled', 'OptionButton', button_disabled_sb) set_stylebox('disabled_mirrored', 'OptionButton', button_disabled_sb) - set_stylebox('focus', 'OptionButton', empty_sb) + set_stylebox('focus', 'OptionButton', base_empty_sb) set_stylebox('normal', 'OptionButton', button_sb) set_stylebox('normal_mirrored', 'OptionButton', button_sb) set_stylebox('pressed', 'OptionButton', button_pressed_sb) @@ -1075,47 +560,59 @@ func _init() -> void: # Popups - set_constant('item_start_padding', 'PopupMenu', popup_margin * scale) - set_constant('v_separation', 'PopupMenu', base_margin * 1.75 * scale) + set_constant('item_start_padding', 'PopupMenu', int(popup_margin * scale)) + set_constant('v_separation', 'PopupMenu', int(base_margin * 1.75 * scale)) set_stylebox('hover', 'PopupMenu', flat_button_hover_sb) sb = base_sb.duplicate() sb.bg_color = _get_base_color(-0.8, 0.9) - sb.set_content_margin_all(popup_margin) + sb.set_content_margin_all(int(popup_margin * scale)) sb.set_corner_radius_all(0) if draw_extra_borders: - _set_border(sb, extra_border_color_2, floor(scale)) + _set_border(sb, extra_border_color_2, floorf(scale)) set_stylebox('panel', 'PopupMenu', sb) - var line_sb := StyleBoxLine.new() + var line_sb : StyleBoxLine = StyleBoxLine.new() line_sb.color = _get_base_color(0.1, 0.8) line_sb.grow_begin = base_margin * -1.5 * scale line_sb.grow_end = base_margin * -1.5 * scale - line_sb.thickness = ceil(scale) + line_sb.thickness = int(ceilf(scale)) set_stylebox('labeled_separator_left', 'PopupMenu', line_sb) set_stylebox('labeled_separator_right', 'PopupMenu', line_sb) set_stylebox('separator', 'PopupMenu', line_sb) - set_stylebox('panel', 'PanelContainer', empty_wide_sb) + set_stylebox('panel', 'PanelContainer', base_empty_wide_sb) sb = base_sb.duplicate() sb.bg_color = _get_base_color(-0.8, 0.9) sb.shadow_color = Color(0, 0, 0, 0.3) - sb.shadow_size = base_margin * 0.75 * scale - sb.set_content_margin_all(popup_margin) + sb.shadow_size = int(base_margin * 0.75 * scale) + sb.set_content_margin_all(int(popup_margin * scale)) sb.set_corner_radius_all(0) if draw_extra_borders: - _set_border(sb, extra_border_color_2, floor(scale)) + _set_border(sb, extra_border_color_2, floorf(scale)) set_stylebox('panel', 'PopupPanel', sb) sb = base_sb.duplicate() sb.bg_color = _get_base_color(-0.8, 0.9) sb.set_content_margin_all(0) if draw_extra_borders: - _set_border(sb, extra_border_color_2, floor(scale)) + _set_border(sb, extra_border_color_2, floorf(scale)) set_stylebox('panel', 'TooltipPanel', sb) + sb = base_sb.duplicate() + sb.set_content_margin_all(int(popup_margin * scale)) + sb.set_corner_radius_all(0) + set_stylebox('panel', 'PopupDialog', sb) + set_stylebox('panel', 'AcceptDialog', sb) + + sb = sb.duplicate() + sb.bg_color = _get_base_color(-1) + set_stylebox('panel', 'EditorSettingsDialog', sb) + set_stylebox('panel', 'ProjectSettingsEditor', sb) + set_stylebox('panel', 'EditorAbout', sb) + # ProgressBar sb = base_sb.duplicate() @@ -1124,13 +621,13 @@ func _init() -> void: sb.expand_margin_bottom = base_margin * 0.5 * scale sb.set_content_margin_all(base_margin * scale) if draw_extra_borders: - _set_border(sb, extra_border_color_2, floor(scale)) + _set_border(sb, extra_border_color_2, floorf(scale)) set_stylebox('background', 'ProgressBar', sb) sb = sb.duplicate() sb.bg_color = _get_base_color(0.4, 0.8) if draw_extra_borders: - _set_border(sb, extra_border_color_1, floor(scale)) + _set_border(sb, extra_border_color_1, floorf(scale)) set_stylebox('fill', 'ProgressBar', sb) # RichTextLabel @@ -1142,14 +639,46 @@ func _init() -> void: # ScrollContainer - set_stylebox('focus', 'ScrollContainer', empty_sb) + set_stylebox('panel', 'ScrollContainer', base_empty_sb) + set_stylebox('focus', 'ScrollContainer', base_empty_sb) + + # ScrollBar + + sb = base_sb.duplicate() + sb.bg_color = _get_base_color(0.5, 0.6) + _set_border(sb, _get_base_color(), floorf(scale)) + + set_stylebox('grabber', 'HScrollBar', sb) + set_stylebox('grabber', 'VScrollBar', sb) + + sb = base_sb.duplicate() + sb.bg_color = _get_base_color(1.4, 0.5) + + set_stylebox('grabber_highlight', 'HScrollBar', sb) + set_stylebox('grabber_highlight', 'VScrollBar', sb) + set_stylebox('grabber_pressed', 'HScrollBar', sb) + set_stylebox('grabber_pressed', 'VScrollBar', sb) + + var margin : int = 10 if increase_scrollbar_touch_area else 3 + + empty_sb = base_empty_sb.duplicate() + _set_margin(empty_sb, 0, margin * scale, 0, margin * scale) + + set_stylebox('scroll', 'HScrollBar', empty_sb) + set_stylebox('scroll_focus', 'HScrollBar', empty_sb) + + empty_sb = empty_sb.duplicate() + _set_margin(empty_sb, margin * scale, 0, margin * scale, 0) + + set_stylebox('scroll', 'VScrollBar', empty_sb) + set_stylebox('scroll_focus', 'VScrollBar', empty_sb) # SplitContainer - set_constant('minimum_grab_thickness', 'SplitContainer', base_margin * 1.5 * scale) - set_constant('separation', 'SplitContainer', base_margin * 0.75 * scale) + set_constant('minimum_grab_thickness', 'SplitContainer', int(base_margin * 1.5 * scale)) + set_constant('separation', 'SplitContainer', int(base_margin * 0.75 * scale)) - var empty_texture := PlaceholderTexture2D.new() + var empty_texture : PlaceholderTexture2D = PlaceholderTexture2D.new() empty_texture.size = Vector2(0, 0) set_icon('h_grabber', 'SplitContainer', empty_texture) set_icon('v_grabber', 'SplitContainer', empty_texture) @@ -1159,8 +688,8 @@ func _init() -> void: sb = base_sb.duplicate() _set_margin(sb, base_margin * 3.5, base_margin * 2, base_margin * 3.5, base_margin * 1.5) sb.set_corner_radius_all(0) - sb.border_width_top = 2 * scale - var col = accent_color + sb.border_width_top = int(2 * scale) + var col : Color = accent_color col.v = 0.5 col.s = 0.5 sb.border_color = col @@ -1191,28 +720,42 @@ func _init() -> void: sb = base_sb.duplicate() sb.set_content_margin_all(increased_margin * 1.5 * scale) sb.set_corner_radius_all(0) + sb.corner_radius_bottom_right = int(corner_radius * scale) + sb.corner_radius_bottom_left = int(corner_radius * scale) set_stylebox('panel', 'TabContainer', sb) + sb = base_sb.duplicate() + sb.bg_color = _get_base_color(-1.0) + sb.set_content_margin_all(0) + sb.set_corner_radius_all(0) + set_stylebox('tabbar_background', 'TabContainer', sb) + # Tree set_color('drop_position_color', 'Tree', mono_color * Color(1, 1, 1, 0.4)) - set_color('font_color', 'Tree', mono_color * Color(1, 1, 1, 0.7)) + set_color('font_color', 'Tree', mono_color_icon_and_font * Color(1, 1, 1, 0.7)) set_color('guide_color', 'Tree', Color.TRANSPARENT) set_color('parent_hl_line_color', 'Tree', mono_color * Color(1, 1, 1, relationship_line_opacity)) set_constant('children_hl_line_width', 'Tree', 0) set_constant('draw_guides', 'Tree', 0) set_constant('draw_relationship_lines', 'Tree', 1) - set_constant('inner_item_margin_left', 'Tree', base_margin * scale) - set_constant('inner_item_margin_right', 'Tree', base_margin * scale) - set_constant('parent_hl_line_width', 'Tree', ceil(scale)) + set_constant('inner_item_margin_left', 'Tree', int(base_margin * scale)) + set_constant('inner_item_margin_right', 'Tree', int(base_margin * scale)) + set_constant('parent_hl_line_width', 'Tree', int(ceilf(scale))) set_constant('relationship_line_width', 'Tree', 0) - set_constant('v_separation', 'Tree', ceil(scale) + ceil(extra_spacing * scale)) + set_constant('v_separation', 'Tree', int(base_margin * 0.25 * scale)) - set_stylebox('panel', 'Tree', empty_margin_sb) + # Using empty stylebox for trees to avoid drawing unnecessary borders in docks. + # Note that using opaque color that is the same as dock background + # doesn't work because EditorPropertyResource is using Tree panel + # stylebox to draw its background as well, making it look broken + empty_sb = base_empty_sb.duplicate() + empty_sb.set_content_margin_all(base_margin * 2 * scale) + set_stylebox('panel', 'Tree', empty_sb) # Leaving focus empty for trees and scroll containers because there's no way to # make focus indication look not janky when only a part of a dock is highlighted - set_stylebox('focus', 'Tree', empty_sb) + set_stylebox('focus', 'Tree', base_empty_sb) # Rounded corners look a little janky in tree titles because there's no way to # introduce gaps between columns, however not having rounded corners looks even worse @@ -1232,6 +775,11 @@ func _init() -> void: set_stylebox('selected', 'Tree', sb) set_stylebox('selected_focus', 'Tree', sb) + sb = sb.duplicate() + sb.bg_color = _get_base_color(0.5, 0.7) + set_stylebox('hovered_selected', 'Tree', sb) + set_stylebox('hovered_selected_focus', 'Tree', sb) + set_stylebox('button_pressed', 'Tree', flat_button_pressed_sb) set_stylebox('custom_button_pressed', 'Tree', flat_button_pressed_sb) @@ -1246,304 +794,57 @@ func _init() -> void: sb = base_sb.duplicate() sb.bg_color = _get_base_color(-0.55 if dark_theme else -0.9) if draw_extra_borders: - _set_border(sb, extra_border_color_2, floor(scale)) - set_stylebox('panel', 'TreeSecondary', sb) - set_stylebox('panel', 'ItemListSecondary', sb) + _set_border(sb, extra_border_color_2, floorf(scale)) + set_stylebox('panel', 'TreeSecondary', sb) + set_stylebox('panel', 'ItemListSecondary', sb) + + # HACKS + # This section is for workarounds for unthemable UI + # These could be fixed on the engine side in the future + + # TilesetEditor + + # Tileset editor is using Tree panel for the panel container of expanded view, while minimal theme + # needs trees to be transparent, so it needs to have an explicitly set style for the theme + # to still be able to support transparent Trees + # See https://github.com/godotengine/godot/issues/99118 + (func() -> void: + # Check to see if we're running in project manager + if EditorInterface.get_script_editor() == null: + return + + var tileset_editor : Control = EditorInterface.get_base_control().find_children('', 'TileSetEditor', true, false)[0] + var expand_panel : Control = tileset_editor.get_child(3) + var panel_sb : StyleBoxFlat = base_sb.duplicate() + panel_sb.set_corner_radius_all(0) + expand_panel.add_theme_stylebox_override('panel', panel_sb) + var _error : int = tileset_editor.theme_changed.connect(func() -> void: + expand_panel.add_theme_stylebox_override('panel', panel_sb) + ) + ).call_deferred() # Lighten base color in dark theme, darken in light theme, clamp func _get_base_color(brightness_offset: float = 0, saturation_multiplier: float = 1) -> Color: - var dark = dark_theme if brightness_offset >= 0 else !dark_theme - var color = Color(base_color) - color.v = clampf(lerpf(color.v, 1 if dark else 0, abs(contrast * brightness_offset)), 0, 1) + var dark : bool = dark_theme if brightness_offset >= 0 else !dark_theme + var color : Color = Color(base_color) + color.v = clampf(lerpf(color.v, 1 if dark else 0, absf(contrast * brightness_offset)), 0, 1) color.s *= saturation_multiplier return color # Shorthand content margin setter -func _set_margin(sb: StyleBox, left: float, top: float, right: float = left, botton: float = top) -> void: +func _set_margin(sb: StyleBox, left: float, top: float, right: float = left, bottom: float = top) -> void: sb.content_margin_left = left * scale sb.content_margin_top = top * scale sb.content_margin_right = right * scale - sb.content_margin_bottom = botton * scale + sb.content_margin_bottom = bottom * scale # Shorthand border setter -func _set_border(sb: StyleBox, color: Color, width: float = 1, blend: bool = false) -> void: +func _set_border(sb: StyleBoxFlat, color: Color, width: float = 1, blend: bool = false) -> void: sb.border_color = color sb.border_blend = blend - sb.set_border_width_all(ceil(width * scale)) + sb.set_border_width_all(int(ceilf(width * scale))) " + [resource] -AnimationBezierTrackEdit/colors/focus_color = Color(1, 1, 1, 0) -AnimationBezierTrackEdit/colors/h_line_color = Color(1, 1, 1, 0.12) -AnimationBezierTrackEdit/colors/track_focus_color = Color(1, 1, 1, 0.1) -AnimationBezierTrackEdit/colors/v_line_color = Color(1, 1, 1, 0) -AnimationTimelineEdit/colors/font_primary_color = Color(1, 1, 1, 0.7) -AnimationTimelineEdit/colors/font_secondary_color = Color(1, 1, 1, 0.4) -AnimationTimelineEdit/colors/h_line_color = Color(1, 1, 1, 0) -AnimationTimelineEdit/colors/v_line_primary_color = Color(1, 1, 1, 0.4) -AnimationTimelineEdit/colors/v_line_secondary_color = Color(1, 1, 1, 0.08) -AnimationTimelineEdit/constants/text_primary_margin = 3 -AnimationTimelineEdit/constants/text_secondary_margin = 2 -AnimationTimelineEdit/constants/v_line_primary_margin = 4 -AnimationTimelineEdit/constants/v_line_primary_width = 2 -AnimationTimelineEdit/constants/v_line_secondary_margin = 6 -AnimationTimelineEdit/constants/v_line_secondary_width = 1 -AnimationTimelineEdit/styles/time_available = SubResource("StyleBoxFlat_fyay6") -AnimationTimelineEdit/styles/time_unavailable = SubResource("StyleBoxFlat_n8od0") -AnimationTrackEdit/colors/h_line_color = Color(1, 1, 1, 0) -AnimationTrackEdit/constants/h_separation = 6 -AnimationTrackEdit/styles/focus = SubResource("StyleBoxFlat_2m50i") -AnimationTrackEdit/styles/hover = SubResource("StyleBoxFlat_g8l50") -AnimationTrackEdit/styles/odd = SubResource("StyleBoxFlat_pndtk") -AnimationTrackEditGroup/colors/bg_color = Color(0.1974, 0.2256, 0.2726, 1) -AnimationTrackEditGroup/colors/h_line_color = Color(1, 1, 1, 0) -AnimationTrackEditGroup/colors/v_line_color = Color(1, 1, 1, 0) -AnimationTrackEditGroup/constants/h_separation = 8 -AnimationTrackEditGroup/styles/header = SubResource("StyleBoxFlat_th5jy") -BottomPanelButton/styles/hover = SubResource("StyleBoxFlat_yy0bd") -BottomPanelButton/styles/hover_pressed = SubResource("StyleBoxFlat_2vulq") -BottomPanelButton/styles/normal = SubResource("StyleBoxEmpty_mpbwm") -BottomPanelButton/styles/pressed = SubResource("StyleBoxFlat_yy0bd") -Button/colors/font_color = Color(1, 1, 1, 0.7) -Button/colors/font_disabled_color = Color(1, 1, 1, 0.3) -Button/colors/font_focus_color = Color(1, 1, 1, 1) -Button/colors/font_hover_color = Color(1, 1, 1, 1) -Button/colors/font_hover_pressed_color = Color(1, 1, 1, 1) -Button/colors/font_pressed_color = Color(1, 1, 1, 1) -Button/colors/icon_disabled_color = Color(1, 1, 1, 0.3) -Button/colors/icon_normal_color = Color(1, 1, 1, 0.7) -Button/constants/outline_size = 0 -Button/styles/disabled = SubResource("StyleBoxFlat_ncj7f") -Button/styles/disabled_mirrored = SubResource("StyleBoxFlat_ncj7f") -Button/styles/focus = SubResource("StyleBoxEmpty_v2c1j") -Button/styles/hover = SubResource("StyleBoxFlat_bfne4") -Button/styles/hover_mirrored = SubResource("StyleBoxFlat_bfne4") -Button/styles/hover_pressed = SubResource("StyleBoxFlat_ffe6y") -Button/styles/hover_pressed_mirrored = SubResource("StyleBoxFlat_ffe6y") -Button/styles/normal = SubResource("StyleBoxFlat_6walj") -Button/styles/normal_mirrored = SubResource("StyleBoxFlat_6walj") -Button/styles/pressed = SubResource("StyleBoxFlat_ffe6y") -Button/styles/pressed_mirrored = SubResource("StyleBoxFlat_ffe6y") -CheckBox/colors/font_hover_pressed_color = Color(1, 1, 1, 1) -CheckBox/colors/font_pressed_color = Color(1, 1, 1, 0.7) -CheckBox/styles/normal = SubResource("StyleBoxFlat_6gc6b") -CheckBox/styles/normal_mirrored = SubResource("StyleBoxFlat_6gc6b") -CheckButton/colors/font_focus_color = Color(1, 1, 1, 0.7) -CheckButton/colors/font_hover_pressed_color = Color(1, 1, 1, 1) -CheckButton/colors/font_pressed_color = Color(1, 1, 1, 0.7) -Editor/colors/background = Color(0.1722, 0.1968, 0.2378, 1) -Editor/colors/box_selection_fill_color = Color(1, 1, 1, 0.12) -Editor/colors/box_selection_stroke_color = Color(1, 1, 1, 0.4) -Editor/colors/dark_color_2 = Color(0, 0, 0, 0.3) -Editor/colors/forward_plus_color = Color(0.54902, 0.752941, 0.392157, 1) -Editor/colors/gl_compatibility_color = Color(0.447059, 0.698039, 0.890196, 1) -Editor/colors/mobile_color = Color(0.862745, 0.482353, 0.584314, 1) -Editor/colors/prop_subsection = Color(1, 1, 1, 0) -Editor/colors/property_color_w = Color(1, 1, 1, 0.8) -Editor/colors/property_color_x = Color(0.882353, 0.384314, 0.466667, 1) -Editor/colors/property_color_y = Color(0.764706, 0.937255, 0.396078, 1) -Editor/colors/property_color_z = Color(0.415686, 0.670588, 0.964706, 1) -Editor/colors/warning_color = Color(0.95, 0.855, 0.57, 1) -Editor/constants/top_bar_separation = 4 -Editor/constants/window_border_margin = 4 -EditorHelpBitContent/styles/normal = SubResource("StyleBoxFlat_nvlhq") -EditorHelpBitTitle/styles/normal = SubResource("StyleBoxFlat_o4lbp") -EditorInspector/constants/v_separation = 3 -EditorInspectorCategory/styles/bg = SubResource("StyleBoxFlat_uoqhw") -EditorInspectorSection/constants/h_separation = 4 -EditorLogFilterButton/styles/hover = SubResource("StyleBoxFlat_m70y3") -EditorLogFilterButton/styles/normal = SubResource("StyleBoxEmpty_v2c1j") -EditorLogFilterButton/styles/pressed = SubResource("StyleBoxFlat_5kknp") -EditorProperty/colors/property_color = Color(1, 1, 1, 0.6) -EditorProperty/colors/warning_color = Color(0.95, 0.855, 0.57, 1) -EditorProperty/styles/bg = SubResource("StyleBoxEmpty_v2c1j") -EditorProperty/styles/bg_selected = SubResource("StyleBoxEmpty_v2c1j") -EditorProperty/styles/child_bg = SubResource("StyleBoxFlat_6omkk") -EditorSpinSlider/styles/label_bg = SubResource("StyleBoxFlat_wgaex") -EditorStyles/colors/movie_writer_icon_hover = Color(1, 1, 1, 0.8) -EditorStyles/colors/movie_writer_icon_hover_pressed = Color(1, 1, 1, 0.8) -EditorStyles/colors/movie_writer_icon_normal = Color(1, 1, 1, 0.7) -EditorStyles/colors/movie_writer_icon_pressed = Color(1, 1, 1, 0.941176) -EditorStyles/styles/FocusViewport = SubResource("StyleBoxFlat_8y8hw") -EditorStyles/styles/Information3dViewport = SubResource("StyleBoxFlat_xfcx5") -EditorStyles/styles/LaunchPadMovieMode = SubResource("StyleBoxFlat_vofr8") -EditorStyles/styles/LaunchPadNormal = SubResource("StyleBoxFlat_84rx5") -EditorStyles/styles/MovieWriterButtonPressed = SubResource("StyleBoxFlat_yq7t6") -EditorValidationPanel/styles/panel = SubResource("StyleBoxFlat_4n35b") -FlatButton/colors/font_color = Color(1, 1, 1, 0.7) -FlatButton/colors/font_disabled_color = Color(1, 1, 1, 0.3) -FlatButton/colors/font_focus_color = Color(1, 1, 1, 1) -FlatButton/colors/font_hover_color = Color(1, 1, 1, 1) -FlatButton/colors/font_hover_pressed_color = Color(1, 1, 1, 1) -FlatButton/colors/font_pressed_color = Color(1, 1, 1, 1) -FlatButton/colors/icon_disabled_color = Color(1, 1, 1, 0.3) -FlatButton/colors/icon_normal_color = Color(1, 1, 1, 0.7) -FlatButton/styles/disabled = SubResource("StyleBoxEmpty_mpbwm") -FlatButton/styles/disabled_mirrored = SubResource("StyleBoxEmpty_mpbwm") -FlatButton/styles/hover = SubResource("StyleBoxFlat_5kknp") -FlatButton/styles/hover_mirrored = SubResource("StyleBoxFlat_5kknp") -FlatButton/styles/hover_pressed = SubResource("StyleBoxFlat_m70y3") -FlatButton/styles/hover_pressed_mirrored = SubResource("StyleBoxFlat_m70y3") -FlatButton/styles/normal = SubResource("StyleBoxEmpty_mpbwm") -FlatButton/styles/normal_mirrored = SubResource("StyleBoxEmpty_mpbwm") -FlatButton/styles/pressed = SubResource("StyleBoxFlat_m70y3") -FlatButton/styles/pressed_mirrored = SubResource("StyleBoxFlat_m70y3") -FlatMenuButton/colors/font_color = Color(1, 1, 1, 0.7) -FlatMenuButton/colors/font_disabled_color = Color(1, 1, 1, 0.3) -FlatMenuButton/colors/font_focus_color = Color(1, 1, 1, 1) -FlatMenuButton/colors/font_hover_color = Color(1, 1, 1, 1) -FlatMenuButton/colors/font_hover_pressed_color = Color(1, 1, 1, 1) -FlatMenuButton/colors/font_pressed_color = Color(1, 1, 1, 1) -FlatMenuButton/colors/icon_disabled_color = Color(1, 1, 1, 0.3) -FlatMenuButton/colors/icon_normal_color = Color(1, 1, 1, 0.7) -FlatMenuButton/styles/disabled = SubResource("StyleBoxEmpty_mpbwm") -FlatMenuButton/styles/disabled_mirrored = SubResource("StyleBoxEmpty_mpbwm") -FlatMenuButton/styles/focus = SubResource("StyleBoxEmpty_mpbwm") -FlatMenuButton/styles/hover = SubResource("StyleBoxFlat_5kknp") -FlatMenuButton/styles/hover_mirrored = SubResource("StyleBoxFlat_5kknp") -FlatMenuButton/styles/hover_pressed = SubResource("StyleBoxFlat_m70y3") -FlatMenuButton/styles/hover_pressed_mirrored = SubResource("StyleBoxFlat_m70y3") -FlatMenuButton/styles/normal = SubResource("StyleBoxEmpty_mpbwm") -FlatMenuButton/styles/normal_mirrored = SubResource("StyleBoxEmpty_mpbwm") -FlatMenuButton/styles/pressed = SubResource("StyleBoxFlat_m70y3") -FlatMenuButton/styles/pressed_mirrored = SubResource("StyleBoxFlat_m70y3") -GraphStateMachine/colors/focus_color = Color(1, 1, 1, 0) -HBoxContainer/constants/separation = 2 -HSplitContainer/constants/autohide = 1 -HSplitContainer/constants/minimum_grab_thickness = 6 -HSplitContainer/constants/separation = 2 -InspectorActionButton/constants/h_separation = 8 -InspectorActionButton/styles/disabled = SubResource("StyleBoxFlat_ncj7f") -InspectorActionButton/styles/disabled_mirrored = SubResource("StyleBoxFlat_ncj7f") -InspectorActionButton/styles/hover = SubResource("StyleBoxFlat_bfne4") -InspectorActionButton/styles/hover_mirrored = SubResource("StyleBoxFlat_bfne4") -InspectorActionButton/styles/normal = SubResource("StyleBoxFlat_6walj") -InspectorActionButton/styles/normal_mirrored = SubResource("StyleBoxFlat_6walj") -InspectorActionButton/styles/pressed = SubResource("StyleBoxFlat_ffe6y") -InspectorActionButton/styles/pressed_mirrored = SubResource("StyleBoxFlat_ffe6y") -ItemList/colors/guide_color = Color(1, 1, 1, 0) -ItemList/constants/v_separation = 6 -ItemList/styles/cursor = SubResource("StyleBoxFlat_0rr50") -ItemList/styles/cursor_unfocused = SubResource("StyleBoxFlat_0rr50") -ItemList/styles/focus = SubResource("StyleBoxEmpty_v2c1j") -ItemList/styles/hovered = SubResource("StyleBoxFlat_5kknp") -ItemList/styles/hovered_selected = SubResource("StyleBoxFlat_5kknp") -ItemList/styles/hovered_selected_focus = SubResource("StyleBoxFlat_5kknp") -ItemList/styles/panel = SubResource("StyleBoxEmpty_saief") -ItemList/styles/selected = SubResource("StyleBoxFlat_5kknp") -ItemList/styles/selected_focus = SubResource("StyleBoxFlat_5kknp") -ItemListSecondary/styles/panel = SubResource("StyleBoxFlat_w4yjj") -Label/colors/font_color = Color(1, 1, 1, 0.7) -Label/styles/normal = SubResource("StyleBoxEmpty_wdwaf") -LineEdit/colors/font_placeholder_color = Color(1, 1, 1, 0.4) -LineEdit/styles/focus = SubResource("StyleBoxFlat_vps6v") -LineEdit/styles/normal = SubResource("StyleBoxFlat_3fkrk") -LineEdit/styles/read_only = SubResource("StyleBoxFlat_unybh") -MainMenuBar/styles/hover = SubResource("StyleBoxFlat_5kknp") -MainMenuBar/styles/hover_pressed = SubResource("StyleBoxFlat_m70y3") -MainMenuBar/styles/normal = SubResource("StyleBoxEmpty_mpbwm") -MainMenuBar/styles/pressed = SubResource("StyleBoxFlat_m70y3") -MainScreenButton/styles/hover = SubResource("StyleBoxEmpty_mpbwm") -MainScreenButton/styles/hover_mirrored = SubResource("StyleBoxEmpty_mpbwm") -MainScreenButton/styles/hover_pressed = SubResource("StyleBoxEmpty_mpbwm") -MainScreenButton/styles/hover_pressed_mirrored = SubResource("StyleBoxEmpty_mpbwm") -MainScreenButton/styles/normal = SubResource("StyleBoxEmpty_mpbwm") -MainScreenButton/styles/normal_mirrored = SubResource("StyleBoxEmpty_mpbwm") -MainScreenButton/styles/pressed = SubResource("StyleBoxEmpty_mpbwm") -MainScreenButton/styles/pressed_mirrored = SubResource("StyleBoxEmpty_mpbwm") -MenuButton/styles/disabled = SubResource("StyleBoxEmpty_mpbwm") -MenuButton/styles/disabled_mirrored = SubResource("StyleBoxEmpty_mpbwm") -MenuButton/styles/focus = SubResource("StyleBoxEmpty_mpbwm") -MenuButton/styles/hover = SubResource("StyleBoxFlat_5kknp") -MenuButton/styles/hover_mirrored = SubResource("StyleBoxFlat_5kknp") -MenuButton/styles/hover_pressed = SubResource("StyleBoxFlat_5kknp") -MenuButton/styles/hover_pressed_mirrored = SubResource("StyleBoxFlat_5kknp") -MenuButton/styles/normal = SubResource("StyleBoxEmpty_mpbwm") -MenuButton/styles/normal_mirrored = SubResource("StyleBoxEmpty_mpbwm") -MenuButton/styles/pressed = SubResource("StyleBoxFlat_m70y3") -MenuButton/styles/pressed_mirrored = SubResource("StyleBoxFlat_m70y3") -OptionButton/colors/font_color = Color(1, 1, 1, 0.7) -OptionButton/colors/font_disabled_color = Color(1, 1, 1, 0.3) -OptionButton/colors/font_focus_color = Color(1, 1, 1, 1) -OptionButton/colors/font_hover_color = Color(1, 1, 1, 1) -OptionButton/colors/font_hover_pressed_color = Color(1, 1, 1, 1) -OptionButton/colors/font_pressed_color = Color(1, 1, 1, 1) -OptionButton/colors/icon_disabled_color = Color(1, 1, 1, 0.3) -OptionButton/colors/icon_normal_color = Color(1, 1, 1, 0.7) -OptionButton/constants/arrow_margin = 14 -OptionButton/styles/disabled = SubResource("StyleBoxFlat_ncj7f") -OptionButton/styles/disabled_mirrored = SubResource("StyleBoxFlat_ncj7f") -OptionButton/styles/focus = SubResource("StyleBoxEmpty_v2c1j") -OptionButton/styles/hover = SubResource("StyleBoxFlat_bfne4") -OptionButton/styles/hover_mirrored = SubResource("StyleBoxFlat_bfne4") -OptionButton/styles/hover_pressed = SubResource("StyleBoxFlat_ffe6y") -OptionButton/styles/hover_pressed_mirrored = SubResource("StyleBoxFlat_ffe6y") -OptionButton/styles/normal = SubResource("StyleBoxFlat_6walj") -OptionButton/styles/normal_mirrored = SubResource("StyleBoxFlat_6walj") -OptionButton/styles/pressed = SubResource("StyleBoxFlat_ffe6y") -OptionButton/styles/pressed_mirrored = SubResource("StyleBoxFlat_ffe6y") -PanelContainer/styles/panel = SubResource("StyleBoxEmpty_mpbwm") -PopupMenu/constants/item_start_padding = 9 -PopupMenu/constants/v_separation = 7 -PopupMenu/styles/hover = SubResource("StyleBoxFlat_5kknp") -PopupMenu/styles/labeled_separator_left = SubResource("StyleBoxLine_ody4d") -PopupMenu/styles/labeled_separator_right = SubResource("StyleBoxLine_ody4d") -PopupMenu/styles/panel = SubResource("StyleBoxFlat_bscl1") -PopupMenu/styles/separator = SubResource("StyleBoxLine_ody4d") -PopupPanel/styles/panel = SubResource("StyleBoxFlat_52p6q") -ProgressBar/styles/background = SubResource("StyleBoxFlat_5wxaw") -ProgressBar/styles/fill = SubResource("StyleBoxFlat_jerwe") -RichTextLabel/styles/normal = SubResource("StyleBoxFlat_u1plv") -ScrollContainer/styles/focus = SubResource("StyleBoxEmpty_v2c1j") -SplitContainer/constants/minimum_grab_thickness = 6 -SplitContainer/constants/separation = 3 -SplitContainer/icons/h_grabber = SubResource("PlaceholderTexture2D_6288g") -SplitContainer/icons/v_grabber = SubResource("PlaceholderTexture2D_6288g") -TabBar/styles/tab_focus = SubResource("StyleBoxFlat_yaatb") -TabBar/styles/tab_hovered = SubResource("StyleBoxFlat_dv0ye") -TabBar/styles/tab_selected = SubResource("StyleBoxFlat_8el8h") -TabBar/styles/tab_unselected = SubResource("StyleBoxFlat_47qw1") -TabContainer/styles/panel = SubResource("StyleBoxFlat_fbtpk") -TabContainer/styles/tab_focus = SubResource("StyleBoxFlat_yaatb") -TabContainer/styles/tab_hovered = SubResource("StyleBoxFlat_dv0ye") -TabContainer/styles/tab_selected = SubResource("StyleBoxFlat_8el8h") -TabContainer/styles/tab_unselected = SubResource("StyleBoxFlat_47qw1") -TabContainerOdd/styles/tab_selected = SubResource("StyleBoxFlat_p7ig6") -TextEdit/styles/focus = SubResource("StyleBoxFlat_vps6v") -TextEdit/styles/normal = SubResource("StyleBoxFlat_3fkrk") -TextEdit/styles/read_only = SubResource("StyleBoxFlat_unybh") -TooltipPanel/styles/panel = SubResource("StyleBoxFlat_c6asc") -Tree/colors/drop_position_color = Color(1, 1, 1, 0.4) -Tree/colors/font_color = Color(1, 1, 1, 0.7) -Tree/colors/guide_color = Color(1, 1, 1, 0) -Tree/colors/parent_hl_line_color = Color(1, 1, 1, 0.1) -Tree/constants/children_hl_line_width = 0 -Tree/constants/draw_guides = 0 -Tree/constants/draw_relationship_lines = 1 -Tree/constants/inner_item_margin_left = 4 -Tree/constants/inner_item_margin_right = 4 -Tree/constants/parent_hl_line_width = 1 -Tree/constants/relationship_line_width = 0 -Tree/constants/v_separation = 1 -Tree/styles/button_hover = SubResource("StyleBoxFlat_ovxqj") -Tree/styles/button_pressed = SubResource("StyleBoxFlat_m70y3") -Tree/styles/cursor = SubResource("StyleBoxFlat_kmb46") -Tree/styles/cursor_unfocused = SubResource("StyleBoxFlat_kmb46") -Tree/styles/custom_button_hover = SubResource("StyleBoxFlat_ovxqj") -Tree/styles/custom_button_pressed = SubResource("StyleBoxFlat_m70y3") -Tree/styles/focus = SubResource("StyleBoxEmpty_v2c1j") -Tree/styles/hover = SubResource("StyleBoxFlat_ovxqj") -Tree/styles/hovered = SubResource("StyleBoxFlat_ovxqj") -Tree/styles/hovered_dimmed = SubResource("StyleBoxFlat_ovxqj") -Tree/styles/panel = SubResource("StyleBoxEmpty_saief") -Tree/styles/selected = SubResource("StyleBoxFlat_ovxqj") -Tree/styles/selected_focus = SubResource("StyleBoxFlat_ovxqj") -Tree/styles/title_button_hover = SubResource("StyleBoxFlat_p53la") -Tree/styles/title_button_normal = SubResource("StyleBoxFlat_p53la") -Tree/styles/title_button_pressed = SubResource("StyleBoxFlat_p53la") -TreeSecondary/styles/panel = SubResource("StyleBoxFlat_w4yjj") -VBoxContainer/constants/separation = 2 -VSplitContainer/constants/autohide = 1 -VSplitContainer/constants/minimum_grab_thickness = 6 -VSplitContainer/constants/separation = 2 -script = SubResource("GDScript_hhmc0") +script = SubResource("GDScript_hhmc0") \ No newline at end of file diff --git a/objects/big_coin.tscn b/objects/big_coin.tscn index 4cff7f9..87b1eb7 100644 --- a/objects/big_coin.tscn +++ b/objects/big_coin.tscn @@ -1,9 +1,10 @@ -[gd_scene load_steps=6 format=3 uid="uid://bargnp4twtmxg"] +[gd_scene load_steps=7 format=3 uid="uid://bargnp4twtmxg"] [ext_resource type="Texture2D" uid="uid://djifxc5x0dyrw" path="res://sprites/ppc_tileset.png" id="1_aya2w"] [ext_resource type="Script" path="res://scripts/components/collectable.gd" id="2_7cph7"] [ext_resource type="Resource" uid="uid://bsnr5v2b2mfsl" path="res://resources/collectables/big_coin.tres" id="3_lk3av"] [ext_resource type="Script" path="res://scripts/components/fade_away.gd" id="4_wkrj0"] +[ext_resource type="AudioStream" uid="uid://bceic1csr8rq3" path="res://sfx/pickup_coin_2.wav" id="5_dbffd"] [sub_resource type="CircleShape2D" id="CircleShape2D_3ask2"] radius = 9.0 @@ -22,10 +23,11 @@ hframes = 12 vframes = 12 frame = 51 -[node name="Collectable" type="Node" parent="." node_paths=PackedStringArray("area2d") groups=["coins"]] +[node name="Collectable" type="Node" parent="." node_paths=PackedStringArray("area2d", "sfx") groups=["coins"]] script = ExtResource("2_7cph7") area2d = NodePath("..") collectable_data = ExtResource("3_lk3av") +sfx = NodePath("../sfx") [node name="FadeAwayComponent" type="Node" parent="." node_paths=PackedStringArray("sprite2d", "root", "area2d")] script = ExtResource("4_wkrj0") @@ -33,3 +35,7 @@ sprite2d = NodePath("../Sprite2D") fade_duration = 0.4 root = NodePath("..") area2d = NodePath("..") + +[node name="sfx" type="AudioStreamPlayer2D" parent="."] +stream = ExtResource("5_dbffd") +volume_db = -5.0 diff --git a/objects/big_treasure.tscn b/objects/big_treasure.tscn index 5346e97..8185d56 100644 --- a/objects/big_treasure.tscn +++ b/objects/big_treasure.tscn @@ -1,9 +1,10 @@ -[gd_scene load_steps=6 format=3 uid="uid://d08dfqmirnd66"] +[gd_scene load_steps=7 format=3 uid="uid://d08dfqmirnd66"] [ext_resource type="Texture2D" uid="uid://djifxc5x0dyrw" path="res://sprites/ppc_tileset.png" id="1_1co1x"] [ext_resource type="Script" path="res://scripts/components/collectable.gd" id="2_cujcq"] [ext_resource type="Resource" uid="uid://b6xqotmke54x" path="res://resources/collectables/big_treasure.tres" id="3_k64cr"] [ext_resource type="Script" path="res://scripts/components/fade_away.gd" id="4_nw7tw"] +[ext_resource type="AudioStream" uid="uid://wr7n5ivv06ux" path="res://sfx/pickup_coin_4.wav" id="5_fxf8v"] [sub_resource type="CircleShape2D" id="CircleShape2D_3ask2"] radius = 9.0 @@ -21,10 +22,11 @@ hframes = 12 vframes = 12 frame = 64 -[node name="Collectable" type="Node" parent="." node_paths=PackedStringArray("area2d") groups=["coins"]] +[node name="Collectable" type="Node" parent="." node_paths=PackedStringArray("area2d", "sfx") groups=["coins"]] script = ExtResource("2_cujcq") area2d = NodePath("..") collectable_data = ExtResource("3_k64cr") +sfx = NodePath("../sfx") [node name="FadeAwayComponent" type="Node" parent="." node_paths=PackedStringArray("sprite2d", "root", "area2d")] script = ExtResource("4_nw7tw") @@ -32,3 +34,6 @@ sprite2d = NodePath("../Sprite2D") fade_duration = 0.4 root = NodePath("..") area2d = NodePath("..") + +[node name="sfx" type="AudioStreamPlayer2D" parent="."] +stream = ExtResource("5_fxf8v") diff --git a/objects/brick_player.tscn b/objects/brick_player.tscn index 25ad50e..5880343 100644 --- a/objects/brick_player.tscn +++ b/objects/brick_player.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=21 format=3 uid="uid://bqi5s710xb1ju"] +[gd_scene load_steps=24 format=3 uid="uid://bqi5s710xb1ju"] [ext_resource type="Script" path="res://scripts/player.gd" id="1_8j4h4"] [ext_resource type="Texture2D" uid="uid://b7gp0gqvkv8j4" path="res://sprites/MrBrick_base.png" id="2_bc55y"] @@ -17,6 +17,9 @@ [ext_resource type="Script" path="res://scripts/components/magnetic_skill.gd" id="15_4df3h"] [ext_resource type="Script" path="res://scripts/components/can_be_launched_component.gd" id="16_kemlv"] [ext_resource type="Script" path="res://scripts/components/trigger_lever_component.gd" id="17_hglfj"] +[ext_resource type="AudioStream" uid="uid://duj2q0rqytaxg" path="res://sfx/jump.wav" id="18_pysae"] +[ext_resource type="AudioStream" uid="uid://bmfn6p88gy575" path="res://sfx/player_hurt.wav" id="19_7anly"] +[ext_resource type="AudioStream" uid="uid://ycgtf6wj7mto" path="res://sfx/heal.wav" id="20_bptj5"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_hdsg1"] size = Vector2(16, 31) @@ -27,10 +30,11 @@ size = Vector2(16, 32) [sub_resource type="CircleShape2D" id="CircleShape2D_ps31c"] radius = 48.0 -[node name="Brick Player" type="CharacterBody2D"] +[node name="Brick Player" type="CharacterBody2D" node_paths=PackedStringArray("jump_sfx")] collision_layer = 4 collision_mask = 43 script = ExtResource("1_8j4h4") +jump_sfx = NodePath("sfx_jump") [node name="Root" type="Node2D" parent="."] @@ -72,8 +76,10 @@ shape = SubResource("RectangleShape2D_vad0t") [node name="ScoreComponent" type="Node" parent="."] script = ExtResource("6_fowa2") -[node name="HealthComponent" type="Node" parent="."] +[node name="HealthComponent" type="Node" parent="." node_paths=PackedStringArray("hurt_fx", "heal_fx")] script = ExtResource("7_tqjk8") +hurt_fx = NodePath("../sfx_hurt") +heal_fx = NodePath("../sfx_heal") [node name="PlayerDeathComponent" type="Node" parent="."] process_mode = 3 @@ -140,5 +146,14 @@ script = ExtResource("16_kemlv") [node name="TriggerLeverComponent" type="Node" parent="."] script = ExtResource("17_hglfj") +[node name="sfx_jump" type="AudioStreamPlayer2D" parent="."] +stream = ExtResource("18_pysae") + +[node name="sfx_hurt" type="AudioStreamPlayer2D" parent="."] +stream = ExtResource("19_7anly") + +[node name="sfx_heal" type="AudioStreamPlayer2D" parent="."] +stream = ExtResource("20_bptj5") + [connection signal="on_death" from="HealthComponent" to="PlayerDeathComponent" method="_on_health_component_on_death"] [connection signal="on_health_change" from="HealthComponent" to="KnockbackComponent" method="_on_health_component_on_health_change"] diff --git a/objects/child.tscn b/objects/child.tscn new file mode 100644 index 0000000..70de940 --- /dev/null +++ b/objects/child.tscn @@ -0,0 +1,51 @@ +[gd_scene load_steps=9 format=3 uid="uid://d0s2abysa86rq"] + +[ext_resource type="Texture2D" uid="uid://b7gp0gqvkv8j4" path="res://sprites/MrBrick_base.png" id="1_jcisc"] +[ext_resource type="Texture2D" uid="uid://jl1gwqchhpdc" path="res://sprites/left_eye.png" id="2_8jrbi"] +[ext_resource type="Texture2D" uid="uid://iiawtnwmeny3" path="res://sprites/right_eye.png" id="3_k41y7"] +[ext_resource type="Texture2D" uid="uid://8h05rd26t66q" path="res://sprites/lollipop.png" id="4_vq1oq"] +[ext_resource type="Script" path="res://scripts/components/collectable.gd" id="5_wc3ym"] +[ext_resource type="Resource" uid="uid://b6apusc0jmi3x" path="res://resources/collectables/child.tres" id="6_vmvuo"] +[ext_resource type="AudioStream" uid="uid://drfr0wlgkhkdq" path="res://sfx/child_pickup.wav" id="7_j8eyh"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_dj5g5"] +size = Vector2(10, 20) + +[node name="Child" type="Area2D"] +collision_layer = 0 +collision_mask = 4 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_dj5g5") + +[node name="Root" type="Node2D" parent="."] + +[node name="Body" type="Node2D" parent="Root"] +scale = Vector2(0.5, 0.5) + +[node name="Base" type="Sprite2D" parent="Root/Body"] +texture = ExtResource("1_jcisc") + +[node name="Left Eye" type="Sprite2D" parent="Root/Body"] +position = Vector2(-7, -6) +texture = ExtResource("2_8jrbi") +hframes = 2 + +[node name="Right Eye" type="Sprite2D" parent="Root/Body"] +position = Vector2(6, -5) +texture = ExtResource("3_k41y7") +hframes = 2 + +[node name="Sprite2D" type="Sprite2D" parent="Root"] +position = Vector2(6, 1) +rotation = 0.785398 +texture = ExtResource("4_vq1oq") + +[node name="CollectableComponent" type="Node" parent="." node_paths=PackedStringArray("area2d", "sfx")] +script = ExtResource("5_wc3ym") +area2d = NodePath("..") +collectable_data = ExtResource("6_vmvuo") +sfx = NodePath("../sfx_pickup") + +[node name="sfx_pickup" type="AudioStreamPlayer2D" parent="."] +stream = ExtResource("7_j8eyh") diff --git a/objects/coin.tscn b/objects/coin.tscn index b733272..e6b69a4 100644 --- a/objects/coin.tscn +++ b/objects/coin.tscn @@ -1,9 +1,10 @@ -[gd_scene load_steps=6 format=3 uid="uid://54w4wisfj8v8"] +[gd_scene load_steps=7 format=3 uid="uid://54w4wisfj8v8"] [ext_resource type="Texture2D" uid="uid://djifxc5x0dyrw" path="res://sprites/ppc_tileset.png" id="1_epuj5"] [ext_resource type="Script" path="res://scripts/components/collectable.gd" id="2_y0k47"] [ext_resource type="Resource" uid="uid://vql535ckoeqm" path="res://resources/collectables/coin.tres" id="3_fm2fq"] [ext_resource type="Script" path="res://scripts/components/fade_away.gd" id="4_fx1h2"] +[ext_resource type="AudioStream" uid="uid://dpyr80hk4kebc" path="res://sfx/pickup_coin_1.wav" id="5_4jc2c"] [sub_resource type="CircleShape2D" id="CircleShape2D_3ask2"] radius = 9.0 @@ -21,10 +22,11 @@ hframes = 12 vframes = 12 frame = 51 -[node name="Collectable" type="Node" parent="." node_paths=PackedStringArray("area2d") groups=["coins"]] +[node name="Collectable" type="Node" parent="." node_paths=PackedStringArray("area2d", "sfx") groups=["coins"]] script = ExtResource("2_y0k47") area2d = NodePath("..") collectable_data = ExtResource("3_fm2fq") +sfx = NodePath("../sfx") [node name="FadeAwayComponent" type="Node" parent="." node_paths=PackedStringArray("sprite2d", "root", "area2d")] script = ExtResource("4_fx1h2") @@ -32,3 +34,7 @@ sprite2d = NodePath("../Sprite2D") fade_duration = 0.4 root = NodePath("..") area2d = NodePath("..") + +[node name="sfx" type="AudioStreamPlayer2D" parent="."] +stream = ExtResource("5_4jc2c") +volume_db = -5.0 diff --git a/objects/enemy.tscn b/objects/enemy.tscn index fa8efc2..3411904 100644 --- a/objects/enemy.tscn +++ b/objects/enemy.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=16 format=3 uid="uid://bwdlmualj6xbw"] +[gd_scene load_steps=18 format=3 uid="uid://bwdlmualj6xbw"] [ext_resource type="Shader" uid="uid://bs4xvm4qkurpr" path="res://shaders/hit_flash.tres" id="1_ep4yr"] [ext_resource type="Texture2D" uid="uid://xes6mt2dd5gu" path="res://sprites/robot_cutout.png" id="1_uh38l"] @@ -12,6 +12,8 @@ [ext_resource type="Script" path="res://scripts/components/status_effect_component.gd" id="10_5i27q"] [ext_resource type="Script" path="res://scripts/components/fire_effect_component.gd" id="10_ej8vg"] [ext_resource type="Script" path="res://scripts/components/ice_effect_component.gd" id="11_pq0k7"] +[ext_resource type="AudioStream" uid="uid://b3tsqhr06pbrs" path="res://sfx/enemy_hurt.wav" id="13_u4k3d"] +[ext_resource type="AudioStream" uid="uid://dyev46uqusimi" path="res://sfx/shoot.wav" id="14_tdjks"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_pwwji"] size = Vector2(18, 27) @@ -35,8 +37,9 @@ shape = SubResource("RectangleShape2D_pwwji") material = SubResource("ShaderMaterial_j18j0") texture = ExtResource("1_uh38l") -[node name="HealthComponent" type="Node" parent="."] +[node name="HealthComponent" type="Node" parent="." node_paths=PackedStringArray("hurt_fx")] script = ExtResource("2_o170m") +hurt_fx = NodePath("../sfx_hurt") [node name="DamageComponent" type="Node" parent="." node_paths=PackedStringArray("area2d")] script = ExtResource("4_4eajk") @@ -105,3 +108,9 @@ root = NodePath("..") script = ExtResource("11_pq0k7") components_to_disable = [NodePath("../SideToSideMovement"), NodePath("../PeriodicShootingComponent")] status_effect_component = NodePath("../StatusEffectComponent") + +[node name="sfx_hurt" type="AudioStreamPlayer2D" parent="."] +stream = ExtResource("13_u4k3d") + +[node name="sfx_shoot" type="AudioStreamPlayer2D" parent="."] +stream = ExtResource("14_tdjks") diff --git a/objects/treasure.tscn b/objects/treasure.tscn index 7a3575d..d901864 100644 --- a/objects/treasure.tscn +++ b/objects/treasure.tscn @@ -1,9 +1,10 @@ -[gd_scene load_steps=6 format=3 uid="uid://073ts5cxtwbl"] +[gd_scene load_steps=7 format=3 uid="uid://073ts5cxtwbl"] [ext_resource type="Texture2D" uid="uid://djifxc5x0dyrw" path="res://sprites/ppc_tileset.png" id="1_uh3ex"] [ext_resource type="Script" path="res://scripts/components/collectable.gd" id="2_i1ssp"] [ext_resource type="Resource" uid="uid://bws2xldndlre1" path="res://resources/collectables/treasure.tres" id="3_uknsr"] [ext_resource type="Script" path="res://scripts/components/fade_away.gd" id="4_ccbcr"] +[ext_resource type="AudioStream" uid="uid://d2rj7uy5f0kwm" path="res://sfx/pickup_coin_3.wav" id="5_xt2rk"] [sub_resource type="CircleShape2D" id="CircleShape2D_3ask2"] radius = 9.0 @@ -21,10 +22,11 @@ hframes = 12 vframes = 12 frame = 66 -[node name="Collectable" type="Node" parent="." node_paths=PackedStringArray("area2d") groups=["coins"]] +[node name="Collectable" type="Node" parent="." node_paths=PackedStringArray("area2d", "sfx") groups=["coins"]] script = ExtResource("2_i1ssp") area2d = NodePath("..") collectable_data = ExtResource("3_uknsr") +sfx = NodePath("../sfx") [node name="FadeAwayComponent" type="Node" parent="." node_paths=PackedStringArray("sprite2d", "root", "area2d")] script = ExtResource("4_ccbcr") @@ -32,3 +34,7 @@ sprite2d = NodePath("../Sprite2D") fade_duration = 0.4 root = NodePath("..") area2d = NodePath("..") + +[node name="sfx" type="AudioStreamPlayer2D" parent="."] +stream = ExtResource("5_xt2rk") +volume_db = -5.0 diff --git a/resources/collectables/child.tres b/resources/collectables/child.tres new file mode 100644 index 0000000..3fe5be4 --- /dev/null +++ b/resources/collectables/child.tres @@ -0,0 +1,7 @@ +[gd_resource type="Resource" script_class="CollectableResource" load_steps=2 format=3 uid="uid://b6apusc0jmi3x"] + +[ext_resource type="Script" path="res://scripts/resources/collectable_resource.gd" id="1_2d5tb"] + +[resource] +script = ExtResource("1_2d5tb") +amount = 1 diff --git a/scenes/test.tscn b/scenes/test.tscn index 486741d..2cd9d4d 100644 --- a/scenes/test.tscn +++ b/scenes/test.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=33 format=4 uid="uid://h60obxmju6mo"] +[gd_scene load_steps=34 format=4 uid="uid://h60obxmju6mo"] [ext_resource type="Texture2D" uid="uid://djifxc5x0dyrw" path="res://sprites/ppc_tileset.png" id="1_5lb42"] [ext_resource type="TileSet" uid="uid://cl4bn8lofqvky" path="res://tileset/village/tileset_village.tres" id="1_d680t"] @@ -20,6 +20,7 @@ [ext_resource type="PackedScene" uid="uid://dstko446qydsc" path="res://objects/cannon.tscn" id="11_qv64j"] [ext_resource type="Script" path="res://addons/phantom_camera/scripts/phantom_camera/phantom_camera_2d.gd" id="13_rsy5s"] [ext_resource type="Script" path="res://addons/phantom_camera/scripts/resources/tween_resource.gd" id="14_mjvn7"] +[ext_resource type="PackedScene" uid="uid://d0s2abysa86rq" path="res://objects/child.tscn" id="21_8rhdx"] [sub_resource type="Gradient" id="Gradient_anvhr"] offsets = PackedFloat32Array(1) @@ -506,3 +507,6 @@ follow_target = NodePath("../Brick Player") tween_resource = SubResource("Resource_lsjk3") follow_damping = true limit_target = NodePath("../Terrain Layer") + +[node name="Child" parent="." instance=ExtResource("21_8rhdx")] +position = Vector2(880, -570) diff --git a/scripts/components/cage_component.gd b/scripts/components/cage_component.gd index e58de2c..b57ef5b 100644 --- a/scripts/components/cage_component.gd +++ b/scripts/components/cage_component.gd @@ -12,10 +12,8 @@ func _ready() -> void: await get_tree().process_frame if not lever: var levers_nodes := get_tree().get_nodes_in_group("levers") - print("Found levers: ", levers_nodes) for lever_node in levers_nodes: var lever_component: LeverComponent = lever_node.get_node_or_null("LeverComponent") - print("Lever component: ", lever_component) if lever_component: lever_component.activated.connect(on_lever_activated) else: @@ -27,7 +25,6 @@ func _ready() -> void: func on_lever_activated() -> void: - print("Lever activated, moving cage.") var tween: Tween = create_tween() var end_position: Vector2 = root.position + move_value tween.tween_property(root, "position", end_position, tween_duration) diff --git a/scripts/components/collectable.gd b/scripts/components/collectable.gd index a5400f8..810370f 100644 --- a/scripts/components/collectable.gd +++ b/scripts/components/collectable.gd @@ -6,6 +6,7 @@ var has_fade_away: bool = false @export var area2d: Area2D @export var collectable_data: CollectableResource +@export var sfx: AudioStreamPlayer2D signal collected(amount: int) @@ -24,5 +25,8 @@ func _ready() -> void: func _on_area2d_body_entered(body: Node2D) -> void: if body.has_node("CanPickUpComponent"): collected.emit(collectable_data.amount) + if sfx: + sfx.play() if not has_fade_away: + await sfx.finished root.queue_free() diff --git a/scripts/components/health.gd b/scripts/components/health.gd index 212aaaa..6d732d7 100644 --- a/scripts/components/health.gd +++ b/scripts/components/health.gd @@ -3,51 +3,70 @@ extends Node @export var health: float = 1.0 @export var max_health: float = 1.0 - +@export var hurt_fx: AudioStreamPlayer2D +@export var heal_fx: AudioStreamPlayer2D signal on_health_change(delta: float, total_health: float) signal on_death + func _get_delta(value: float) -> float: var old_value = health return value - old_value + func set_health(new_value: float): var delta = _get_delta(new_value) - + + if sign(delta) > 0: + if heal_fx: + heal_fx.play() + elif sign(delta) < 0: + if hurt_fx: + hurt_fx.play() + + await hurt_fx.finished + if new_value >= max_health: health = max_health on_health_change.emit(delta, health) return - + health = new_value - + if health <= 0: on_death.emit() return - + on_health_change.emit(delta, health) + func decrease_health(value: float): var delta = _get_delta(value) - + health -= value - + if hurt_fx: + hurt_fx.play() + await hurt_fx.finished + if health <= 0: on_death.emit() return - + on_health_change.emit(delta, health) - + + func increase_health(value: float): var delta = _get_delta(value) - + health += value - + if health >= max_health: health = max_health on_health_change.emit(delta, health) return - + health += value + if heal_fx: + heal_fx.play() on_health_change.emit(delta, health) diff --git a/scripts/components/jump_pad_component.gd b/scripts/components/jump_pad_component.gd index f343ec1..43eb80a 100644 --- a/scripts/components/jump_pad_component.gd +++ b/scripts/components/jump_pad_component.gd @@ -28,6 +28,8 @@ func _on_body_entered(body: Node2D) -> void: if body is PlayerController: handle_launchpad_animation() body.velocity.y = -jump_force + if body.jump_sfx: + body.jump_sfx.play() func handle_launchpad_animation() -> void: diff --git a/scripts/components/lever_component.gd b/scripts/components/lever_component.gd index d4a8238..7186583 100644 --- a/scripts/components/lever_component.gd +++ b/scripts/components/lever_component.gd @@ -29,7 +29,6 @@ func _on_body_entered(body: Node2D) -> void: func activate() -> void: - print("Lever activated.") activated.emit() sprite2d.frame = start_animation_index + 1 var timer := get_tree().create_timer(animation_duration) diff --git a/scripts/player.gd b/scripts/player.gd index e0d2601..f2f72b7 100644 --- a/scripts/player.gd +++ b/scripts/player.gd @@ -3,8 +3,8 @@ extends CharacterBody2D @export var speed: float = 300.0 -var gravity = ProjectSettings.get_setting("physics/2d/default_gravity") -var last_direction: Vector2 = Vector2.RIGHT +var gravity = ProjectSettings.get_setting("physics/2d/default_gravity") +var last_direction: Vector2 = Vector2.RIGHT var previous_velocity: Vector2 = Vector2.ZERO @onready var root = $Root @@ -13,19 +13,21 @@ var previous_velocity: Vector2 = Vector2.ZERO @export var jump_height: float = 100 @export var jump_time_to_peak: float = 0.5 @export var jump_time_to_descent: float = 0.4 - @export var coyote_frames: int = 6 @export var coyote_mode: bool = false @export var was_last_floor: bool = false +@export var jump_sfx: AudioStreamPlayer2D @onready var jump_velocity: float = ((2.0 * jump_height) / jump_time_to_peak) * -1.0 @onready var jump_gravity: float = ((-2.0 * jump_height) / (jump_time_to_peak * jump_time_to_peak)) * -1.0 @onready var fall_gravity: float = ((-2.0 * jump_height) / (jump_time_to_descent * jump_time_to_descent)) * -1.0 + func _ready() -> void: coyote_timer.timeout.connect(on_coyote_timer_timeout) coyote_timer.wait_time = coyote_frames / 60.0 + func _process(_delta): if velocity.x > 0.0: root.rotation = deg_to_rad(-10) @@ -33,50 +35,56 @@ func _process(_delta): root.rotation = deg_to_rad(10) else: root.rotation = 0 - + + func _physics_process(delta): if is_on_floor(): was_last_floor = true coyote_mode = false # Reset coyote mode when back on the floor coyote_timer.stop() # Stop timer when grounded else: - if was_last_floor: # Start coyote timer only once + if was_last_floor: # Start coyote timer only once coyote_mode = true coyote_timer.start() was_last_floor = false - + if not is_on_floor(): velocity.y += calculate_gravity() * delta if Input.is_action_pressed("jump") and (is_on_floor() or coyote_mode): jump() - + if Input.is_action_just_pressed("down"): position.y += 1 - + var direction := Input.get_axis("left", "right") if direction != 0: last_direction = handle_direction(direction) - + if direction: velocity.x = direction * speed else: velocity.x = move_toward(velocity.x, 0, speed) - + previous_velocity = velocity move_and_slide() - + + func jump(): velocity.y = jump_velocity coyote_mode = false - + if jump_sfx: + jump_sfx.play() + + func calculate_gravity() -> float: return jump_gravity if velocity.y < 0.0 else fall_gravity + func on_coyote_timer_timeout(): coyote_mode = false - + func handle_direction(input_dir: float) -> Vector2: if input_dir > 0: return Vector2.RIGHT diff --git a/sfx/child_pickup.wav b/sfx/child_pickup.wav new file mode 100644 index 0000000..469c847 Binary files /dev/null and b/sfx/child_pickup.wav differ diff --git a/sfx/child_pickup.wav.import b/sfx/child_pickup.wav.import new file mode 100644 index 0000000..4ad338d --- /dev/null +++ b/sfx/child_pickup.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://drfr0wlgkhkdq" +path="res://.godot/imported/child_pickup.wav-5809159f50b9d46e7e099b81ca166e24.sample" + +[deps] + +source_file="res://sfx/child_pickup.wav" +dest_files=["res://.godot/imported/child_pickup.wav-5809159f50b9d46e7e099b81ca166e24.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/sfx/enemy_hurt.wav b/sfx/enemy_hurt.wav new file mode 100644 index 0000000..fde4a53 Binary files /dev/null and b/sfx/enemy_hurt.wav differ diff --git a/sfx/enemy_hurt.wav.import b/sfx/enemy_hurt.wav.import new file mode 100644 index 0000000..09a842b --- /dev/null +++ b/sfx/enemy_hurt.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://b3tsqhr06pbrs" +path="res://.godot/imported/enemy_hurt.wav-50b9e9bcd43d59b08ded3a73711340cb.sample" + +[deps] + +source_file="res://sfx/enemy_hurt.wav" +dest_files=["res://.godot/imported/enemy_hurt.wav-50b9e9bcd43d59b08ded3a73711340cb.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/sfx/explosion.wav b/sfx/explosion.wav new file mode 100644 index 0000000..45060c3 Binary files /dev/null and b/sfx/explosion.wav differ diff --git a/sfx/explosion.wav.import b/sfx/explosion.wav.import new file mode 100644 index 0000000..73cfb8e --- /dev/null +++ b/sfx/explosion.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://cmkc4huykx4oi" +path="res://.godot/imported/explosion.wav-865094309361083ba4c2c3e081b1f684.sample" + +[deps] + +source_file="res://sfx/explosion.wav" +dest_files=["res://.godot/imported/explosion.wav-865094309361083ba4c2c3e081b1f684.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/sfx/heal.wav b/sfx/heal.wav new file mode 100644 index 0000000..6ddc40f Binary files /dev/null and b/sfx/heal.wav differ diff --git a/sfx/heal.wav.import b/sfx/heal.wav.import new file mode 100644 index 0000000..2597493 --- /dev/null +++ b/sfx/heal.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://ycgtf6wj7mto" +path="res://.godot/imported/heal.wav-3855e10a97ba6061f054d1c1fad58a1c.sample" + +[deps] + +source_file="res://sfx/heal.wav" +dest_files=["res://.godot/imported/heal.wav-3855e10a97ba6061f054d1c1fad58a1c.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/sfx/jump.wav b/sfx/jump.wav new file mode 100644 index 0000000..1389c08 Binary files /dev/null and b/sfx/jump.wav differ diff --git a/sfx/jump.wav.import b/sfx/jump.wav.import new file mode 100644 index 0000000..0dd4737 --- /dev/null +++ b/sfx/jump.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://duj2q0rqytaxg" +path="res://.godot/imported/jump.wav-86b04f40cc1820c332f6911b8abfc17a.sample" + +[deps] + +source_file="res://sfx/jump.wav" +dest_files=["res://.godot/imported/jump.wav-86b04f40cc1820c332f6911b8abfc17a.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/sfx/pickup_coin_1.wav b/sfx/pickup_coin_1.wav new file mode 100644 index 0000000..7d349a1 Binary files /dev/null and b/sfx/pickup_coin_1.wav differ diff --git a/sfx/pickup_coin_1.wav.import b/sfx/pickup_coin_1.wav.import new file mode 100644 index 0000000..67edd09 --- /dev/null +++ b/sfx/pickup_coin_1.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://dpyr80hk4kebc" +path="res://.godot/imported/pickup_coin_1.wav-2e7c3166534ca699b4db8631df393007.sample" + +[deps] + +source_file="res://sfx/pickup_coin_1.wav" +dest_files=["res://.godot/imported/pickup_coin_1.wav-2e7c3166534ca699b4db8631df393007.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/sfx/pickup_coin_2.wav b/sfx/pickup_coin_2.wav new file mode 100644 index 0000000..4f02dda Binary files /dev/null and b/sfx/pickup_coin_2.wav differ diff --git a/sfx/pickup_coin_2.wav.import b/sfx/pickup_coin_2.wav.import new file mode 100644 index 0000000..dcfb1e3 --- /dev/null +++ b/sfx/pickup_coin_2.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://bceic1csr8rq3" +path="res://.godot/imported/pickup_coin_2.wav-6e599ccffc19810710f47b6be4f50847.sample" + +[deps] + +source_file="res://sfx/pickup_coin_2.wav" +dest_files=["res://.godot/imported/pickup_coin_2.wav-6e599ccffc19810710f47b6be4f50847.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/sfx/pickup_coin_3.wav b/sfx/pickup_coin_3.wav new file mode 100644 index 0000000..b73689e Binary files /dev/null and b/sfx/pickup_coin_3.wav differ diff --git a/sfx/pickup_coin_3.wav.import b/sfx/pickup_coin_3.wav.import new file mode 100644 index 0000000..0f06293 --- /dev/null +++ b/sfx/pickup_coin_3.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://d2rj7uy5f0kwm" +path="res://.godot/imported/pickup_coin_3.wav-9ca83ce7791a21201edb3797ab0a1437.sample" + +[deps] + +source_file="res://sfx/pickup_coin_3.wav" +dest_files=["res://.godot/imported/pickup_coin_3.wav-9ca83ce7791a21201edb3797ab0a1437.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/sfx/pickup_coin_4.wav b/sfx/pickup_coin_4.wav new file mode 100644 index 0000000..0092188 Binary files /dev/null and b/sfx/pickup_coin_4.wav differ diff --git a/sfx/pickup_coin_4.wav.import b/sfx/pickup_coin_4.wav.import new file mode 100644 index 0000000..642f252 --- /dev/null +++ b/sfx/pickup_coin_4.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://wr7n5ivv06ux" +path="res://.godot/imported/pickup_coin_4.wav-bc3c9ad917f3e4f2de8fb49beb8ba494.sample" + +[deps] + +source_file="res://sfx/pickup_coin_4.wav" +dest_files=["res://.godot/imported/pickup_coin_4.wav-bc3c9ad917f3e4f2de8fb49beb8ba494.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/sfx/player_hurt.wav b/sfx/player_hurt.wav new file mode 100644 index 0000000..164f5a7 Binary files /dev/null and b/sfx/player_hurt.wav differ diff --git a/sfx/player_hurt.wav.import b/sfx/player_hurt.wav.import new file mode 100644 index 0000000..697cf28 --- /dev/null +++ b/sfx/player_hurt.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://bmfn6p88gy575" +path="res://.godot/imported/player_hurt.wav-726edd1f516b3964ec0104c57edafe2a.sample" + +[deps] + +source_file="res://sfx/player_hurt.wav" +dest_files=["res://.godot/imported/player_hurt.wav-726edd1f516b3964ec0104c57edafe2a.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/sfx/shoot.wav b/sfx/shoot.wav new file mode 100644 index 0000000..399d2fe Binary files /dev/null and b/sfx/shoot.wav differ diff --git a/sfx/shoot.wav.import b/sfx/shoot.wav.import new file mode 100644 index 0000000..d8a7c71 --- /dev/null +++ b/sfx/shoot.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://dyev46uqusimi" +path="res://.godot/imported/shoot.wav-b280d0cd8488ec3282e3daa20e9276c8.sample" + +[deps] + +source_file="res://sfx/shoot.wav" +dest_files=["res://.godot/imported/shoot.wav-b280d0cd8488ec3282e3daa20e9276c8.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/sprites/lollipop.png b/sprites/lollipop.png new file mode 100644 index 0000000..d1bf364 Binary files /dev/null and b/sprites/lollipop.png differ diff --git a/sprites/lollipop.png.import b/sprites/lollipop.png.import new file mode 100644 index 0000000..88f224d --- /dev/null +++ b/sprites/lollipop.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://8h05rd26t66q" +path="res://.godot/imported/lollipop.png-6ab4585a465de5b2d8932d778919698d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://sprites/lollipop.png" +dest_files=["res://.godot/imported/lollipop.png-6ab4585a465de5b2d8932d778919698d.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1