diff options
author | George L. Albany <Megacake1234@gmail.com> | 2023-03-29 08:18:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-29 08:18:16 +0200 |
commit | 8f213935bdea2400b6809f9d5db45dde3416dedc (patch) | |
tree | 9d333d26e18e0ad29979170edc031f60866e40cd /game/src/MainMenu/ReleaseInfoBox.gd | |
parent | cb5858b80c6dc9918b8366a433ca78a5d4adebed (diff) | |
parent | 793a8939c4f721844c276a3d49293c23c902c8d3 (diff) |
Merge pull request #79 from Spartan322/general-release-info
Diffstat (limited to 'game/src/MainMenu/ReleaseInfoBox.gd')
-rw-r--r-- | game/src/MainMenu/ReleaseInfoBox.gd | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/game/src/MainMenu/ReleaseInfoBox.gd b/game/src/MainMenu/ReleaseInfoBox.gd new file mode 100644 index 0000000..48686f3 --- /dev/null +++ b/game/src/MainMenu/ReleaseInfoBox.gd @@ -0,0 +1,31 @@ +extends HBoxContainer + +@export +var _version_label : Button + +@export +var _commit_label : Button + +@export +var _checksum_label : Button + +# REQUIREMENTS: +# * UIFUN-97 +func _ready(): + _version_label.text = _GIT_INFO_.release_name + _version_label.tooltip_text = _GIT_INFO_.tag + _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) + ")" + + +func _on_version_label_pressed(): + DisplayServer.clipboard_set(_GIT_INFO_.tag) + +func _on_commit_label_pressed(): + DisplayServer.clipboard_set(_GIT_INFO_.commit_hash) + +func _on_checksum_label_pressed(): + DisplayServer.clipboard_set(Checksum.get_checksum_text()) |