diff options
author | Hop311 <Hop3114@gmail.com> | 2023-09-29 01:19:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-29 01:19:49 +0200 |
commit | 57822949341b86649614b343afa2c740efe00ac2 (patch) | |
tree | 462d3f1dc55840790940a186390a93f9882750b4 /game/src/Game/GameSession | |
parent | fadabd3e19605a7f30ee7e3dd1453f21384dd662 (diff) | |
parent | 86dd609511b643a6556c42622ec891c092366c66 (diff) |
Merge pull request #160 from OpenVicProject/terrain-types
Terrain types
Diffstat (limited to 'game/src/Game/GameSession')
-rw-r--r-- | game/src/Game/GameSession/ProvinceOverviewPanel/ProvinceOverviewPanel.gd | 4 | ||||
-rw-r--r-- | game/src/Game/GameSession/ProvinceOverviewPanel/ProvinceOverviewPanel.tscn | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/game/src/Game/GameSession/ProvinceOverviewPanel/ProvinceOverviewPanel.gd b/game/src/Game/GameSession/ProvinceOverviewPanel/ProvinceOverviewPanel.gd index 01175d0..ae42450 100644 --- a/game/src/Game/GameSession/ProvinceOverviewPanel/ProvinceOverviewPanel.gd +++ b/game/src/Game/GameSession/ProvinceOverviewPanel/ProvinceOverviewPanel.gd @@ -3,6 +3,7 @@ extends PanelContainer @export var _province_name_label : Label @export var _region_name_label : Label @export var _life_rating_bar : ProgressBar +@export var _terrain_type_name_label : Label @export var _total_population_label : Label @export var _rgo_icon_texture_rect : TextureRect @export var _rgo_name_label : Label @@ -108,11 +109,12 @@ func _update_info() -> void: GameSingleton.get_province_info_province_key() + _missing_suffix) _region_name_label.text = _province_info.get(GameSingleton.get_province_info_region_key(), GameSingleton.get_province_info_region_key() + _missing_suffix) - _life_rating_bar.value = _province_info.get(GameSingleton.get_province_info_life_rating_key(), 0) _life_rating_bar.tooltip_text = tr("LIFE_RATING_TOOLTIP").format({ "life_rating": Localisation.tr_number(_life_rating_bar.value) }) + _terrain_type_name_label.text = _province_info.get(GameSingleton.get_province_info_terrain_type_key(), + GameSingleton.get_province_info_terrain_type_key() + _missing_suffix) _total_population_label.text = Localisation.tr_number(_province_info.get(GameSingleton.get_province_info_total_population_key(), 0)) diff --git a/game/src/Game/GameSession/ProvinceOverviewPanel/ProvinceOverviewPanel.tscn b/game/src/Game/GameSession/ProvinceOverviewPanel/ProvinceOverviewPanel.tscn index 7a982e9..bbd0b95 100644 --- a/game/src/Game/GameSession/ProvinceOverviewPanel/ProvinceOverviewPanel.tscn +++ b/game/src/Game/GameSession/ProvinceOverviewPanel/ProvinceOverviewPanel.tscn @@ -3,7 +3,7 @@ [ext_resource type="Script" path="res://src/Game/GameSession/ProvinceOverviewPanel/ProvinceOverviewPanel.gd" id="1_3n8k5"] [ext_resource type="PackedScene" uid="uid://cr7p1k2xm7mum" path="res://src/Game/Theme/PieChart/PieChart.tscn" id="2_3oytt"] -[node name="ProvinceOverviewPanel" type="PanelContainer" node_paths=PackedStringArray("_province_name_label", "_region_name_label", "_life_rating_bar", "_total_population_label", "_rgo_icon_texture_rect", "_rgo_name_label", "_buildings_container", "_pop_type_chart", "_pop_ideology_chart", "_pop_culture_chart")] +[node name="ProvinceOverviewPanel" type="PanelContainer" node_paths=PackedStringArray("_province_name_label", "_region_name_label", "_life_rating_bar", "_terrain_type_name_label", "_total_population_label", "_rgo_icon_texture_rect", "_rgo_name_label", "_buildings_container", "_pop_type_chart", "_pop_ideology_chart", "_pop_culture_chart")] editor_description = "UI-56" anchors_preset = 2 anchor_top = 1.0 @@ -16,6 +16,7 @@ script = ExtResource("1_3n8k5") _province_name_label = NodePath("PanelList/TopBarList/NameList/ProvinceName") _region_name_label = NodePath("PanelList/TopBarList/NameList/RegionName") _life_rating_bar = NodePath("PanelList/TopBarList/NameList/LifeRatingBar") +_terrain_type_name_label = NodePath("PanelList/TopBarList/NameList/TerrainTypeName") _total_population_label = NodePath("PanelList/InteractList/TotalPopulation") _rgo_icon_texture_rect = NodePath("PanelList/InteractList/RGOInfo/RGOIcon") _rgo_name_label = NodePath("PanelList/InteractList/RGOInfo/RGOName") @@ -52,6 +53,11 @@ editor_description = "UI-62" layout_mode = 2 mouse_filter = 1 +[node name="TerrainTypeName" type="Label" parent="PanelList/TopBarList/NameList"] +layout_mode = 2 +text = "terrain_type_MISSING" +vertical_alignment = 1 + [node name="CloseButton" type="Button" parent="PanelList/TopBarList"] custom_minimum_size = Vector2(30, 30) layout_mode = 2 |