aboutsummaryrefslogtreecommitdiff
path: root/game/src/GameSession/ProvinceOverviewPanel.gd
diff options
context:
space:
mode:
author George L. Albany <Megacake1234@gmail.com>2023-04-14 18:31:58 +0200
committer GitHub <noreply@github.com>2023-04-14 18:31:58 +0200
commit436b038c1806e326ff6458f1692e9009d3a54346 (patch)
treeb5a33a733398b511eb0aa7781860c8accbadd2a0 /game/src/GameSession/ProvinceOverviewPanel.gd
parent1f04a7827ae377372cb491ff0257a47d0d4c2967 (diff)
parent7241811bd8c9493b7b6c6480e8d63a5fb7f38e4e (diff)
Merge pull request #84 from OpenVic2Project/terrain-map
Diffstat (limited to 'game/src/GameSession/ProvinceOverviewPanel.gd')
-rw-r--r--game/src/GameSession/ProvinceOverviewPanel.gd22
1 files changed, 22 insertions, 0 deletions
diff --git a/game/src/GameSession/ProvinceOverviewPanel.gd b/game/src/GameSession/ProvinceOverviewPanel.gd
new file mode 100644
index 0000000..434f6b1
--- /dev/null
+++ b/game/src/GameSession/ProvinceOverviewPanel.gd
@@ -0,0 +1,22 @@
+extends Panel
+
+@export var _province_name_label : Label
+
+@export var province_identifier: String = "":
+ get: return province_identifier
+ set(v):
+ province_identifier = v
+ update_info()
+
+func _ready():
+ update_info()
+
+func update_info() -> void:
+ _province_name_label.text = province_identifier + "_NAME"
+ visible = not province_identifier.is_empty()
+
+func _on_province_selected(identifier : String) -> void:
+ province_identifier = identifier
+
+func _on_button_pressed() -> void:
+ province_identifier = ""