diff options
author | hop311 <hop3114@gmail.com> | 2024-01-25 00:28:09 +0100 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2024-01-25 21:31:04 +0100 |
commit | 14ba9531d118fab87b360db4aae765807fca3cec (patch) | |
tree | 97a1bff45f91d4b02ef62c4dd9a8e584699e5fdd /src/openvic-simulation/interface/GFX.cpp | |
parent | 3e2ee2cd3553cb0a5949d7a34c5ef2f10ff5c949 (diff) |
Added StringMapCase and case insensitive expect_dictionary_keyscase-rework
Diffstat (limited to 'src/openvic-simulation/interface/GFX.cpp')
-rw-r--r-- | src/openvic-simulation/interface/GFX.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/openvic-simulation/interface/GFX.cpp b/src/openvic-simulation/interface/GFX.cpp index 0ec2954..ca31419 100644 --- a/src/openvic-simulation/interface/GFX.cpp +++ b/src/openvic-simulation/interface/GFX.cpp @@ -26,11 +26,10 @@ node_callback_t Sprite::expect_sprites(length_callback_t length_callback, callba TextureSprite::TextureSprite() : texture_file {}, no_of_frames { NO_FRAMES } {} -bool TextureSprite::_fill_key_map(key_map_t& key_map) { +bool TextureSprite::_fill_key_map(case_insensitive_key_map_t& key_map) { bool ret = Sprite::_fill_key_map(key_map); ret &= add_key_map_entries(key_map, "texturefile", ZERO_OR_ONE, expect_string(assign_variable_callback_string(texture_file)), - "textureFile", ZERO_OR_ONE, expect_string(assign_variable_callback_string(texture_file)), "noOfFrames", ZERO_OR_ONE, expect_uint(assign_variable_callback(no_of_frames)), "norefcount", ZERO_OR_ONE, success_callback, @@ -45,7 +44,7 @@ bool TextureSprite::_fill_key_map(key_map_t& key_map) { TileTextureSprite::TileTextureSprite() : texture_file {}, size {} {} -bool TileTextureSprite::_fill_key_map(key_map_t& key_map) { +bool TileTextureSprite::_fill_key_map(case_insensitive_key_map_t& key_map) { bool ret = Sprite::_fill_key_map(key_map); ret &= add_key_map_entries(key_map, "texturefile", ZERO_OR_ONE, expect_string(assign_variable_callback_string(texture_file)), @@ -59,7 +58,7 @@ bool TileTextureSprite::_fill_key_map(key_map_t& key_map) { ProgressBar::ProgressBar() : back_colour {}, progress_colour {} {} -bool ProgressBar::_fill_key_map(key_map_t& key_map) { +bool ProgressBar::_fill_key_map(case_insensitive_key_map_t& key_map) { bool ret = Sprite::_fill_key_map(key_map); ret &= add_key_map_entries(key_map, "color", ONE_EXACTLY, expect_colour(assign_variable_callback(progress_colour)), @@ -78,7 +77,7 @@ bool ProgressBar::_fill_key_map(key_map_t& key_map) { PieChart::PieChart() : size {} {} -bool PieChart::_fill_key_map(key_map_t& key_map) { +bool PieChart::_fill_key_map(case_insensitive_key_map_t& key_map) { bool ret = Sprite::_fill_key_map(key_map); ret &= add_key_map_entries(key_map, "size", ONE_EXACTLY, expect_uint(assign_variable_callback(size))); return ret; @@ -86,7 +85,7 @@ bool PieChart::_fill_key_map(key_map_t& key_map) { LineChart::LineChart() : size {}, linewidth {} {} -bool LineChart::_fill_key_map(key_map_t& key_map) { +bool LineChart::_fill_key_map(case_insensitive_key_map_t& key_map) { bool ret = Sprite::_fill_key_map(key_map); ret &= add_key_map_entries(key_map, "size", ONE_EXACTLY, expect_ivec2(assign_variable_callback(size)), @@ -98,7 +97,7 @@ bool LineChart::_fill_key_map(key_map_t& key_map) { MaskedFlag::MaskedFlag() : overlay_file {}, mask_file {} {} -bool MaskedFlag::_fill_key_map(key_map_t& key_map) { +bool MaskedFlag::_fill_key_map(case_insensitive_key_map_t& key_map) { bool ret = Sprite::_fill_key_map(key_map); ret &= add_key_map_entries(key_map, "textureFile1", ONE_EXACTLY, expect_string(assign_variable_callback_string(overlay_file)), |