From 95a6b95a5df63fa1bcb1d4680b3fdd7091a9c38e Mon Sep 17 00:00:00 2001 From: hop311 Date: Fri, 23 Aug 2024 00:03:02 +0100 Subject: Rework GUITextLabel to use custom text handling instead of RichTextLabel --- game/src/Game/GameSession/Topbar.gd | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'game/src/Game/GameSession/Topbar.gd') diff --git a/game/src/Game/GameSession/Topbar.gd b/game/src/Game/GameSession/Topbar.gd index 5f5640f..a173ccd 100644 --- a/game/src/Game/GameSession/Topbar.gd +++ b/game/src/Game/GameSession/Topbar.gd @@ -269,8 +269,7 @@ func _update_info() -> void: _country_name_label.set_text(player_country) if _country_rank_label: - # TODO - fix label alignment - _country_rank_label.set_text(" %d" % 1) + _country_rank_label.set_text(str(1)) if _country_prestige_label: _country_prestige_label.set_text(str(11)) @@ -294,7 +293,7 @@ func _update_info() -> void: var available_colonial_power : int = 123 var total_colonial_power : int = 456 _country_colonial_power_label.set_text( - ("%s/%s" if available_colonial_power > 0 else "§R%s§!/%s") % [available_colonial_power, total_colonial_power] + "§%s%s§!/%s" % ["W" if available_colonial_power > 0 else "R", available_colonial_power, total_colonial_power] ) ## Time control @@ -334,7 +333,7 @@ func _update_info() -> void: _technology_current_research_label.set_text("TB_TECH_NO_CURRENT") if _technology_literacy_label: - _technology_literacy_label.set_text("§Y%s%%" % GUINode.float_to_string_dp(80.0, 1)) + _technology_literacy_label.set_text("§Y%s§W%%" % GUINode.float_to_string_dp(80.0, 1)) if _technology_research_points_label: _technology_research_points_label.set_text("§Y%s" % GUINode.float_to_string_dp(10.0, 2)) -- cgit v1.2.3-56-ga3b1