diff options
author | Hop311 <hop3114@gmail.com> | 2023-07-28 15:18:33 +0200 |
---|---|---|
committer | Hop311 <hop3114@gmail.com> | 2023-07-28 15:18:33 +0200 |
commit | 244a669311edc5136aaa730b31ef64fd9d56879d (patch) | |
tree | 2b08788e43e72106442ed74af78fdc67ef83f3ce /game/src/Game | |
parent | ce9022d0df74d6c33db3686622be2050d873ab0b (diff) |
First pass at pops (test pops and density mapmode)
Diffstat (limited to 'game/src/Game')
3 files changed, 14 insertions, 3 deletions
diff --git a/game/src/Game/GameSession/MapControlPanel/MapControlPanel.gd b/game/src/Game/GameSession/MapControlPanel/MapControlPanel.gd index c84f116..350c1a8 100644 --- a/game/src/Game/GameSession/MapControlPanel/MapControlPanel.gd +++ b/game/src/Game/GameSession/MapControlPanel/MapControlPanel.gd @@ -11,7 +11,7 @@ signal zoom_out_button_pressed var _mapmode_button_group : ButtonGroup # REQUIREMENTS: -# * UI-550, UI-552, UI-554, UI-561 +# * UI-550, UI-552, UI-554, UI-561, UI-562 func _add_mapmode_button(identifier : String) -> void: var button := Button.new() button.text = identifier @@ -37,7 +37,7 @@ func _on_game_session_menu_button_pressed() -> void: # REQUIREMENTS: # * SS-76 -# * UIFUN-129, UIFUN-131, UIFUN-133, UIFUN-140 +# * UIFUN-129, UIFUN-131, UIFUN-133, UIFUN-140, UIFUN-141 func _mapmode_pressed(button : BaseButton) -> void: GameSingleton.set_mapmode(button.tooltip_text) diff --git a/game/src/Game/GameSession/ProvinceOverviewPanel/ProvinceOverviewPanel.gd b/game/src/Game/GameSession/ProvinceOverviewPanel/ProvinceOverviewPanel.gd index 13418b6..9a3690e 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 _total_population_label : Label @export var _rgo_icon_texture_rect : TextureRect @export var _rgo_name_label : Label @export var _buildings_container : Container @@ -110,6 +111,8 @@ func _update_info() -> void: "life_rating": Localisation.tr_number(_life_rating_bar.value) }) + _total_population_label.text = Localisation.tr_number(_province_info.get(GameSingleton.get_province_info_total_population_key(), 0)) + _rgo_name_label.text = _province_info.get(GameSingleton.get_province_info_rgo_key(), GameSingleton.get_province_info_rgo_key() + _missing_suffix) _rgo_icon_texture_rect.texture = GameSingleton.get_good_icon_texture(_rgo_name_label.text) diff --git a/game/src/Game/GameSession/ProvinceOverviewPanel/ProvinceOverviewPanel.tscn b/game/src/Game/GameSession/ProvinceOverviewPanel/ProvinceOverviewPanel.tscn index 896f8e9..7c82f10 100644 --- a/game/src/Game/GameSession/ProvinceOverviewPanel/ProvinceOverviewPanel.tscn +++ b/game/src/Game/GameSession/ProvinceOverviewPanel/ProvinceOverviewPanel.tscn @@ -2,7 +2,7 @@ [ext_resource type="Script" path="res://src/Game/GameSession/ProvinceOverviewPanel/ProvinceOverviewPanel.gd" id="1_3n8k5"] -[node name="ProvinceOverviewPanel" type="PanelContainer" node_paths=PackedStringArray("_province_name_label", "_region_name_label", "_life_rating_bar", "_rgo_icon_texture_rect", "_rgo_name_label", "_buildings_container")] +[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")] editor_description = "UI-56" anchors_preset = 2 anchor_top = 1.0 @@ -15,6 +15,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") +_total_population_label = NodePath("PanelList/InteractList/TotalPopulation") _rgo_icon_texture_rect = NodePath("PanelList/InteractList/RGOInfo/RGOIcon") _rgo_name_label = NodePath("PanelList/InteractList/RGOInfo/RGOName") _buildings_container = NodePath("PanelList/InteractList/BuildingsContainer") @@ -63,6 +64,13 @@ size_flags_vertical = 3 layout_mode = 2 mouse_filter = 1 +[node name="TotalPopulation" type="Label" parent="PanelList/InteractList"] +editor_description = "UI-121" +layout_mode = 2 +tooltip_text = "PROVINCE_POPULATION_TOOLTIP" +mouse_filter = 1 +text = "total_population_MISSING" + [node name="RGOInfo" type="HBoxContainer" parent="PanelList/InteractList"] editor_description = "UI-112" layout_mode = 2 |