fonts can now have custom variations via jsons

This commit is contained in:
JHDev2006
2025-10-16 22:46:02 +01:00
parent 823b6274f8
commit 44e7da3fea
7 changed files with 42 additions and 23 deletions

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=56 format=3 uid="uid://c3h2iqkvitqd2"]
[gd_scene load_steps=58 format=3 uid="uid://c3h2iqkvitqd2"]
[ext_resource type="PackedScene" uid="uid://bod0jkf7jc5pm" path="res://Scenes/Prefabs/GameHud.tscn" id="1_ctvpw"]
[ext_resource type="Script" uid="uid://bbxqn16ekbpcl" path="res://Scripts/Classes/Singletons/Global.gd" id="1_t23sr"]
@@ -23,6 +23,8 @@
[ext_resource type="Script" uid="uid://cbal8ms2oe1ik" path="res://Scripts/Classes/Components/ResourceSetterNew.gd" id="19_okfpr"]
[ext_resource type="Texture2D" uid="uid://bhgjvnslkt143" path="res://Assets/Sprites/UI/PanelSelected.png" id="19_xspbb"]
[ext_resource type="JSON" path="res://Assets/Sprites/UI/Cursor.json" id="20_3l3ph"]
[ext_resource type="JSON" path="res://Assets/Sprites/UI/FontMain.json" id="23_3l3ph"]
[ext_resource type="JSON" path="res://Assets/Sprites/UI/ScoreFont.json" id="24_m6bur"]
[sub_resource type="Animation" id="Animation_6jmk5"]
resource_name = "FadeIn"
@@ -441,6 +443,22 @@ metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
script = ExtResource("18_1la0o")
metadata/_custom_type_script = "uid://ctsjagoa5t33f"
[node name="MainFontGetter" type="Node" parent="FontUpdater" node_paths=PackedStringArray("node_to_affect")]
script = ExtResource("19_okfpr")
node_to_affect = NodePath("..")
property_name = "main_font"
mode = 4
resource_json = ExtResource("23_3l3ph")
metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
[node name="ScoreFontGetter" type="Node" parent="FontUpdater" node_paths=PackedStringArray("node_to_affect")]
script = ExtResource("19_okfpr")
node_to_affect = NodePath("..")
property_name = "score_font"
mode = 4
resource_json = ExtResource("24_m6bur")
metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
[node name="TextShadowColourChanger" type="Node" parent="." node_paths=PackedStringArray("labels")]
script = ExtResource("19_l7dvb")
labels = [NodePath("../CanvasLayer/VBoxContainer/ErrorMessage"), NodePath("../CanvasLayer/VBoxContainer/Comment"), NodePath("../CanvasLayer/VBoxContainer/Warning"), NodePath("../GameHUD/FPSCount")]