summaryrefslogtreecommitdiff
path: root/src/ui/stats_display/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/stats_display/scripts')
-rw-r--r--src/ui/stats_display/scripts/progression_label.gd8
-rw-r--r--src/ui/stats_display/scripts/stats_display.gd20
2 files changed, 26 insertions, 2 deletions
diff --git a/src/ui/stats_display/scripts/progression_label.gd b/src/ui/stats_display/scripts/progression_label.gd
index d4a0da0..57db363 100644
--- a/src/ui/stats_display/scripts/progression_label.gd
+++ b/src/ui/stats_display/scripts/progression_label.gd
@@ -3,6 +3,9 @@ extends MarginContainer
enum Type {
BODY_SEGMENT,
+ DASH_SEGMENT,
+ SLOW_SEGMENT,
+ JUMP_SEGMENT,
EMPTY
}
@@ -17,7 +20,10 @@ onready var texture_rect: TextureRect = $HBox/Center/VBox/TextureRect
var textures: Dictionary = {
- Type.BODY_SEGMENT: preload("res://ui/hud/progress_bars/sprites/grow_progress_icon.png"),
+ Type.BODY_SEGMENT: preload("res://ui/hud/progress_bars/sprites/grow/grow_progress_icon.png"),
+ Type.DASH_SEGMENT: preload("res://ui/hud/progress_bars/sprites/dash/dash_progress_icon.png"),
+ Type.SLOW_SEGMENT: preload("res://ui/hud/progress_bars/sprites/slow/slow_progress_icon.png"),
+ Type.JUMP_SEGMENT: preload("res://ui/hud/progress_bars/sprites/jump/jump_progress_icon.png"),
Type.EMPTY: preload("res://ui/stats_display/sprites/sep_8x8.png")
}
diff --git a/src/ui/stats_display/scripts/stats_display.gd b/src/ui/stats_display/scripts/stats_display.gd
index f1f17e8..e9422b1 100644
--- a/src/ui/stats_display/scripts/stats_display.gd
+++ b/src/ui/stats_display/scripts/stats_display.gd
@@ -35,8 +35,14 @@ func _on_display_stats(old_stats: Stats, new_stats: Stats, mut_stats: Array) ->
func _get_type(stat_name: String) -> int:
var type: int
match stat_name:
- "segments":
+ "points", "segments":
type = ProgressionLabel.Type.BODY_SEGMENT
+ "dash_points", "dash_segments":
+ type = ProgressionLabel.Type.DASH_SEGMENT
+ "slow_points", "slow_segments":
+ type = ProgressionLabel.Type.SLOW_SEGMENT
+ "jump_points", "jump_segments":
+ type = ProgressionLabel.Type.JUMP_SEGMENT
_:
type = ProgressionLabel.Type.EMPTY
return type
@@ -47,6 +53,12 @@ func _get_prefix(stat_name: String) -> String:
match stat_name:
"points":
prefix = "points"
+ "dash_points":
+ prefix = "points"
+ "slow_points":
+ prefix = "points"
+ "jump_points":
+ prefix = "points"
_:
prefix = ""
return prefix
@@ -56,6 +68,12 @@ func _should_print(stat_name: String, stats: Dictionary) -> bool:
var to_print: Array = [
"points",
"segments",
+ "dash_points",
+ "dash_segments",
+ "slow_points",
+ "slow_segments",
+ "jump_points",
+ "jump_segments"
]
var to_print_check: Array = [
"dash_percentage",