aboutsummaryrefslogtreecommitdiff
path: root/game/src/MainMenu/ReleaseInfoBox.gd
diff options
context:
space:
mode:
Diffstat (limited to 'game/src/MainMenu/ReleaseInfoBox.gd')
-rw-r--r--game/src/MainMenu/ReleaseInfoBox.gd16
1 files changed, 13 insertions, 3 deletions
diff --git a/game/src/MainMenu/ReleaseInfoBox.gd b/game/src/MainMenu/ReleaseInfoBox.gd
index 48686f3..ca03af3 100644
--- a/game/src/MainMenu/ReleaseInfoBox.gd
+++ b/game/src/MainMenu/ReleaseInfoBox.gd
@@ -9,6 +9,8 @@ var _commit_label : Button
@export
var _checksum_label : Button
+var _checksum : String = "????"
+
# REQUIREMENTS:
# * UIFUN-97
func _ready():
@@ -17,9 +19,17 @@ func _ready():
_commit_label.text = _GIT_INFO_.short_hash
_commit_label.tooltip_text = _GIT_INFO_.commit_hash
# UI-111
- _checksum_label.tooltip_text = "Checksum " + Checksum.get_checksum_text()
- _checksum_label.text = "(" + Checksum.get_checksum_text().substr(0, 4) + ")"
+ _checksum = Checksum.get_checksum_text()
+ _update_checksum_label_text()
+
+func _notification(what : int):
+ match what:
+ NOTIFICATION_TRANSLATION_CHANGED:
+ _update_checksum_label_text()
+func _update_checksum_label_text() -> void:
+ _checksum_label.tooltip_text = tr("MAINMENU_CHECKSUM") % _checksum
+ _checksum_label.text = "(%s)" % _checksum.substr(0, 4)
func _on_version_label_pressed():
DisplayServer.clipboard_set(_GIT_INFO_.tag)
@@ -28,4 +38,4 @@ func _on_commit_label_pressed():
DisplayServer.clipboard_set(_GIT_INFO_.commit_hash)
func _on_checksum_label_pressed():
- DisplayServer.clipboard_set(Checksum.get_checksum_text())
+ DisplayServer.clipboard_set(_checksum)