diff options
author | Hop311 <Hop3114@gmail.com> | 2024-03-04 23:49:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-04 23:49:37 +0100 |
commit | 521f7d3d156f42535fb7574fb36f2726e9d13885 (patch) | |
tree | 8c319b540020aaf382592c9b513a27e9fcaaa603 /extension/src/openvic-extension/classes/GUINode.cpp | |
parent | 9e305db5e5090a1a24979c480d64eebfe2de65da (diff) | |
parent | 9ee1940ac3d15aa4c0a87b84d1c4ab8958184f63 (diff) |
Merge pull request #210 from OpenVicProject/gui-listbox
Add GUIListBox + UI improvements
Diffstat (limited to 'extension/src/openvic-extension/classes/GUINode.cpp')
-rw-r--r-- | extension/src/openvic-extension/classes/GUINode.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/extension/src/openvic-extension/classes/GUINode.cpp b/extension/src/openvic-extension/classes/GUINode.cpp index 5296ad7..73ebb0c 100644 --- a/extension/src/openvic-extension/classes/GUINode.cpp +++ b/extension/src/openvic-extension/classes/GUINode.cpp @@ -18,7 +18,8 @@ using namespace OpenVic; F(TextureProgressBar, progress_bar) \ F(TextureRect, texture_rect) \ F(GUIOverlappingElementsBox, gui_overlapping_elements_box) \ - F(GUIScrollbar, gui_scrollbar) + F(GUIScrollbar, gui_scrollbar) \ + F(GUIListBox, gui_listbox) #define APPLY_TO_TEXTURE_TYPES(F) \ F(GFXSpriteTexture, gfx_sprite_texture) \ @@ -48,6 +49,7 @@ void GUINode::_bind_methods() { OV_BIND_SMETHOD(int_to_formatted_string, { "val" }); OV_BIND_SMETHOD(float_to_formatted_string, { "val", "decimal_places" }); + OV_BIND_SMETHOD(format_province_name, { "province_identifier" }); } GUINode::GUINode() { @@ -189,3 +191,8 @@ String GUINode::int_to_formatted_string(int64_t val) { String GUINode::float_to_formatted_string(float val, int32_t decimal_places) { return Utilities::float_to_formatted_string(val, decimal_places); } + +String GUINode::format_province_name(String const& province_identifier) { + static const String province_prefix = "PROV"; + return province_prefix + province_identifier; +} |