IGT is now visible in marathon mode

This commit is contained in:
JHDev2006
2025-10-02 11:13:02 +01:00
parent 05bca140fd
commit 8dc1583f66
3 changed files with 81 additions and 26 deletions

View File

@@ -530,6 +530,7 @@ uppercase = true
[node name="Time" type="Label" parent="Main/TimeDisplay/TimeLabel"] [node name="Time" type="Label" parent="Main/TimeDisplay/TimeLabel"]
unique_name_in_owner = true unique_name_in_owner = true
visible = false
layout_mode = 1 layout_mode = 1
anchors_preset = -1 anchors_preset = -1
offset_left = -12.0 offset_left = -12.0
@@ -540,27 +541,41 @@ text = " 000"
horizontal_alignment = 2 horizontal_alignment = 2
uppercase = true uppercase = true
[node name="Stopwatch" type="Label" parent="Main/TimeDisplay/TimeLabel"] [node name="VBoxContainer" type="VBoxContainer" parent="Main/TimeDisplay/TimeLabel"]
unique_name_in_owner = true layout_mode = 0
layout_mode = 1 offset_left = -24.0
anchors_preset = -1
offset_left = -16.0
offset_top = 8.0 offset_top = 8.0
offset_right = 24.0 offset_right = 56.0
offset_bottom = 16.0 offset_bottom = 40.0
theme_override_constants/separation = -8
alignment = 1
[node name="Stopwatch" type="Label" parent="Main/TimeDisplay/TimeLabel/VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_vertical = 0
text = "00:00:00" text = "00:00:00"
horizontal_alignment = 2
uppercase = true uppercase = true
[node name="PB" type="Label" parent="Main/TimeDisplay/TimeLabel"] [node name="PB" type="Label" parent="Main/TimeDisplay/TimeLabel/VBoxContainer"]
unique_name_in_owner = true unique_name_in_owner = true
visible = false layout_mode = 2
layout_mode = 1 size_flags_vertical = 0
anchors_preset = -1
offset_left = -24.0
offset_top = 16.0
offset_right = 16.0
offset_bottom = 24.0
text = "+00:00:00" text = "+00:00:00"
horizontal_alignment = 2
uppercase = true
[node name="Control" type="Control" parent="Main/TimeDisplay/TimeLabel/VBoxContainer"]
custom_minimum_size = Vector2(0, 12)
layout_mode = 2
[node name="IGT" type="Label" parent="Main/TimeDisplay/TimeLabel/VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_vertical = 2
text = " ⏲000"
horizontal_alignment = 2
uppercase = true uppercase = true
[node name="Buffer5" type="Control" parent="Main"] [node name="Buffer5" type="Control" parent="Main"]
@@ -918,7 +933,7 @@ grow_horizontal = 0
grow_vertical = 2 grow_vertical = 2
size_flags_horizontal = 10 size_flags_horizontal = 10
size_flags_vertical = 8 size_flags_vertical = 8
text = "⏲000" text = "⏲00:00:00"
horizontal_alignment = 2 horizontal_alignment = 2
[node name="ModernScore" type="Label" parent="ModernHUD/Right/ModernTime"] [node name="ModernScore" type="Label" parent="ModernHUD/Right/ModernTime"]
@@ -932,16 +947,27 @@ size_flags_horizontal = 8
size_flags_vertical = 8 size_flags_vertical = 8
text = "000000000" text = "000000000"
[node name="ModernPB" type="Label" parent="ModernHUD/Right/ModernTime"] [node name="VBoxContainer" type="VBoxContainer" parent="ModernHUD/Right/ModernTime"]
layout_mode = 0
offset_top = 9.0
offset_right = 80.0
offset_bottom = 41.0
theme_override_constants/separation = -4
[node name="ModernPB" type="Label" parent="ModernHUD/Right/ModernTime/VBoxContainer"]
unique_name_in_owner = true unique_name_in_owner = true
layout_mode = 1 layout_mode = 2
anchors_preset = -1
offset_top = 12.0
offset_right = 40.0
offset_bottom = 28.0
size_flags_horizontal = 10 size_flags_horizontal = 10
size_flags_vertical = 8 size_flags_vertical = 8
text = "⏲00" text = "⏲00:00:00"
horizontal_alignment = 2
[node name="ModernIGT" type="Label" parent="ModernHUD/Right/ModernTime/VBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 10
size_flags_vertical = 8
text = "⏲000"
horizontal_alignment = 2 horizontal_alignment = 2
[node name="Timer" type="Timer" parent="."] [node name="Timer" type="Timer" parent="."]
@@ -1036,7 +1062,7 @@ metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
[node name="TextShadowColourChanger" type="Node" parent="." node_paths=PackedStringArray("labels", "shadow_node")] [node name="TextShadowColourChanger" type="Node" parent="." node_paths=PackedStringArray("labels", "shadow_node")]
script = ExtResource("18_jwl8o") script = ExtResource("18_jwl8o")
labels = [NodePath("../Main/ScoreName/CharacterName"), NodePath("../Main/ScoreName/Score"), NodePath("../Main/CoinCount/CoinLabel"), NodePath("../Main/LevelDisplay/WorldTitle"), NodePath("../Main/LevelDisplay/WorldTitle/LevelNum"), NodePath("../Main/TimeDisplay/TimeLabel"), NodePath("../Main/TimeDisplay/TimeLabel/Time"), NodePath("../Main/TimeDisplay/TimeLabel/Stopwatch"), NodePath("../Main/TimeDisplay/TimeLabel/PB"), NodePath("../ModernHUD/TopLeft/CoinCount/ModernCoinCount"), NodePath("../ModernHUD/Right/ModernTime"), NodePath("../ModernHUD/Right/ModernTime/ModernScore"), NodePath("../Main/CoinCount/KeyCount/KeyAmount"), NodePath("../ModernHUD/TopLeft/ModernKeyCount/ModernKeyAmount"), NodePath("../ModernHUD/TopLeft/LifeCount/ModernLifeCount"), NodePath("../Combo/ComboAmount"), null, null, NodePath("../ModernHUD/Right/ModernTime/ModernPB")] labels = [NodePath("../Main/ScoreName/CharacterName"), NodePath("../Main/ScoreName/Score"), NodePath("../Main/CoinCount/CoinLabel"), NodePath("../Main/LevelDisplay/WorldTitle"), NodePath("../Main/LevelDisplay/WorldTitle/LevelNum"), NodePath("../Main/TimeDisplay/TimeLabel"), NodePath("../Main/TimeDisplay/TimeLabel/Time"), NodePath("../Main/TimeDisplay/TimeLabel/VBoxContainer/Stopwatch"), NodePath("../Main/TimeDisplay/TimeLabel/VBoxContainer/PB"), NodePath("../ModernHUD/TopLeft/CoinCount/ModernCoinCount"), NodePath("../ModernHUD/Right/ModernTime"), NodePath("../ModernHUD/Right/ModernTime/ModernScore"), NodePath("../Main/CoinCount/KeyCount/KeyAmount"), NodePath("../ModernHUD/TopLeft/ModernKeyCount/ModernKeyAmount"), NodePath("../ModernHUD/TopLeft/LifeCount/ModernLifeCount"), NodePath("../Combo/ComboAmount"), null, null, NodePath("../ModernHUD/Right/ModernTime/VBoxContainer/ModernPB"), NodePath("../Main/TimeDisplay/TimeLabel/VBoxContainer/IGT"), NodePath("../ModernHUD/Right/ModernTime/VBoxContainer/ModernIGT")]
shadow_node = NodePath("../Main/RedCoins/BorderL/Shadow") shadow_node = NodePath("../Main/RedCoins/BorderL/Shadow")
[node name="HudTemplate" type="Sprite2D" parent="."] [node name="HudTemplate" type="Sprite2D" parent="."]
@@ -1048,7 +1074,7 @@ centered = false
[node name="LabelFontChanger" type="Node" parent="." node_paths=PackedStringArray("labels")] [node name="LabelFontChanger" type="Node" parent="." node_paths=PackedStringArray("labels")]
script = ExtResource("15_jwl8o") script = ExtResource("15_jwl8o")
labels = [NodePath("../Main/ScoreName/CharacterName"), NodePath("../Main/ScoreName/Score"), NodePath("../Main/CoinCount/CoinLabel"), NodePath("../Main/LevelDisplay/WorldTitle"), NodePath("../Main/LevelDisplay/WorldTitle/LevelNum"), NodePath("../Main/TimeDisplay/TimeLabel"), NodePath("../Main/TimeDisplay/TimeLabel/Time"), NodePath("../ModernHUD/TopLeft/CoinCount/ModernCoinCount"), NodePath("../ModernHUD/Right/ModernTime"), NodePath("../ModernHUD/Right/ModernTime/ModernScore"), NodePath("../Main/CoinCount/KeyCount/KeyAmount"), NodePath("../Main/TimeDisplay/TimeLabel/Stopwatch"), NodePath("../Main/TimeDisplay/TimeLabel/PB"), NodePath("../ModernHUD/TopLeft/LifeCount/ModernLifeCount"), NodePath("../Main/CoinCount/KeyCount/KeyAmount"), NodePath("../Combo/ComboAmount"), NodePath("../ModernHUD/TopLeft/ModernKeyCount/ModernKeyAmount"), NodePath("../Main/LevelDisplay/WorldTitle/LevelNum/Crown"), NodePath("../ModernHUD/Right/ModernTime/ModernPB")] labels = [NodePath("../Main/ScoreName/CharacterName"), NodePath("../Main/ScoreName/Score"), NodePath("../Main/CoinCount/CoinLabel"), NodePath("../Main/LevelDisplay/WorldTitle"), NodePath("../Main/LevelDisplay/WorldTitle/LevelNum"), NodePath("../Main/TimeDisplay/TimeLabel"), NodePath("../Main/TimeDisplay/TimeLabel/Time"), NodePath("../ModernHUD/TopLeft/CoinCount/ModernCoinCount"), NodePath("../ModernHUD/Right/ModernTime"), NodePath("../ModernHUD/Right/ModernTime/ModernScore"), NodePath("../Main/CoinCount/KeyCount/KeyAmount"), NodePath("../Main/TimeDisplay/TimeLabel/VBoxContainer/Stopwatch"), NodePath("../Main/TimeDisplay/TimeLabel/VBoxContainer/PB"), NodePath("../ModernHUD/TopLeft/LifeCount/ModernLifeCount"), NodePath("../Main/CoinCount/KeyCount/KeyAmount"), NodePath("../Combo/ComboAmount"), NodePath("../ModernHUD/TopLeft/ModernKeyCount/ModernKeyAmount"), NodePath("../Main/LevelDisplay/WorldTitle/LevelNum/Crown"), NodePath("../ModernHUD/Right/ModernTime/VBoxContainer/ModernPB"), NodePath("../Main/TimeDisplay/TimeLabel/VBoxContainer/IGT"), NodePath("../ModernHUD/Right/ModernTime/VBoxContainer/ModernIGT")]
metadata/_custom_type_script = "uid://co6tjg3w6qpd8" metadata/_custom_type_script = "uid://co6tjg3w6qpd8"
[node name="TextureUpdater" type="Node" parent="." node_paths=PackedStringArray("sprites")] [node name="TextureUpdater" type="Node" parent="." node_paths=PackedStringArray("sprites")]

View File

@@ -89,6 +89,18 @@ tracks/2/keys = {
"update": 1, "update": 1,
"values": [true, false] "values": [true, false]
} }
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Countdown:playing")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
[sub_resource type="Animation" id="Animation_axajb"] [sub_resource type="Animation" id="Animation_axajb"]
length = 0.001 length = 0.001
@@ -128,6 +140,18 @@ tracks/2/keys = {
"update": 1, "update": 1,
"values": [true] "values": [true]
} }
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Countdown:playing")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_qeaax"] [sub_resource type="AnimationLibrary" id="AnimationLibrary_qeaax"]
_data = { _data = {
@@ -167,7 +191,6 @@ metadata/_custom_type_script = "uid://cq6f682453q6o"
[node name="Countdown" type="AudioStreamPlayer" parent="."] [node name="Countdown" type="AudioStreamPlayer" parent="."]
stream = ExtResource("6_qeaax") stream = ExtResource("6_qeaax")
autoplay = true
bus = &"SFX" bus = &"SFX"
script = ExtResource("7_reyer") script = ExtResource("7_reyer")
metadata/_custom_type_script = "uid://dmtw1jesw1vl7" metadata/_custom_type_script = "uid://dmtw1jesw1vl7"

View File

@@ -26,6 +26,7 @@ func handle_main_hud() -> void:
$ModernHUD.visible = Settings.file.visuals.modern_hud $ModernHUD.visible = Settings.file.visuals.modern_hud
$Main/RedCoins.hide() $Main/RedCoins.hide()
$Main/CoinCount.show() $Main/CoinCount.show()
%IGT.hide()
%Combo.hide() %Combo.hide()
$Timer.paused = Settings.file.difficulty.time_limit == 2 $Timer.paused = Settings.file.difficulty.time_limit == 2
$%Time.show() $%Time.show()
@@ -147,6 +148,11 @@ func handle_yoshi_radar() -> void:
func handle_speedrun_timer() -> void: func handle_speedrun_timer() -> void:
%Time.hide() %Time.hide()
%Stopwatch.show() %Stopwatch.show()
%IGT.show()
%IGT.modulate.a = int([Global.GameMode.MARATHON, Global.GameMode.MARATHON_PRACTICE].has(Global.current_game_mode) and get_tree().get_first_node_in_group("Players") != null)
%IGT.text = "" + (str(Global.time).pad_zeros(3))
%ModernIGT.visible = %IGT.modulate.a == 1
%ModernIGT.text = %IGT.text
var late = SpeedrunHandler.timer > SpeedrunHandler.best_time var late = SpeedrunHandler.timer > SpeedrunHandler.best_time
var diff = SpeedrunHandler.best_time - SpeedrunHandler.timer var diff = SpeedrunHandler.best_time - SpeedrunHandler.timer
%PB.visible = SpeedrunHandler.best_time > 0 and (SpeedrunHandler.timer > 0 or Global.current_level != null) %PB.visible = SpeedrunHandler.best_time > 0 and (SpeedrunHandler.timer > 0 or Global.current_level != null)