diff options
author | Hop311 <Hop3114@gmail.com> | 2024-08-03 00:50:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-03 00:50:17 +0200 |
commit | fde15e554dc9ed458a838683c69d10262764db12 (patch) | |
tree | 9e7af8634eafc8461bd02697dd48ae36ca924858 /extension/src/openvic-extension/singletons/PopulationMenu.cpp | |
parent | 8431914a6971cbacfb20bba13a4113d9ac4d5153 (diff) | |
parent | 06b76612b28183f0a047dac3a4127120d2af1b39 (diff) |
Merge pull request #249 from OpenVicProject/utf8-fix
Use UTF8 encoding and simplify godot string conversion
Diffstat (limited to 'extension/src/openvic-extension/singletons/PopulationMenu.cpp')
-rw-r--r-- | extension/src/openvic-extension/singletons/PopulationMenu.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/extension/src/openvic-extension/singletons/PopulationMenu.cpp b/extension/src/openvic-extension/singletons/PopulationMenu.cpp index 65987ad..271068b 100644 --- a/extension/src/openvic-extension/singletons/PopulationMenu.cpp +++ b/extension/src/openvic-extension/singletons/PopulationMenu.cpp @@ -13,8 +13,6 @@ using namespace godot; using namespace OpenVic; -using OpenVic::Utilities::std_view_to_godot_string; - /* POPULATION MENU */ Error MenuSingleton::_population_menu_update_provinces() { @@ -152,7 +150,7 @@ TypedArray<Dictionary> MenuSingleton::get_population_menu_province_list_rows(int province_dict[type_key] = population_menu_t::LIST_ENTRY_PROVINCE; province_dict[index_key] = index; - province_dict[name_key] = std_view_to_godot_string(province_entry.province.get_identifier()); + province_dict[name_key] = Utilities::std_to_godot_string(province_entry.province.get_identifier()); province_dict[size_key] = province_entry.province.get_total_population(); province_dict[change_key] = 0; province_dict[selected_key] = province_entry.selected; @@ -541,7 +539,7 @@ Error MenuSingleton::population_menu_update_locale_sort_cache() { sorted_items.resize(items.size()); for (size_t idx = 0; idx < items.size(); ++idx) { - String identifier = std_view_to_godot_string(items[idx].get_identifier()); + String identifier = Utilities::std_to_godot_string(items[idx].get_identifier()); if constexpr (std::is_same_v<T, ProvinceInstance>) { identifier = GUINode::format_province_name(identifier); } @@ -676,10 +674,10 @@ TypedArray<Dictionary> MenuSingleton::get_population_menu_pop_rows(int32_t start pop_dict[pop_size_key] = pop->get_size(); pop_dict[pop_type_icon_key] = pop->get_type().get_sprite(); - pop_dict[pop_culture_key] = std_view_to_godot_string(pop->get_culture().get_identifier()); + pop_dict[pop_culture_key] = Utilities::std_to_godot_string(pop->get_culture().get_identifier()); pop_dict[pop_religion_icon_key] = pop->get_religion().get_icon(); if (pop->get_location() != nullptr) { - pop_dict[pop_location_key] = std_view_to_godot_string(pop->get_location()->get_identifier()); + pop_dict[pop_location_key] = Utilities::std_to_godot_string(pop->get_location()->get_identifier()); } pop_dict[pop_militancy_key] = pop->get_militancy().to_float(); pop_dict[pop_consciousness_key] = pop->get_consciousness().to_float(); |