diff options
author | hop311 <hop3114@gmail.com> | 2023-12-02 16:48:08 +0100 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2023-12-02 20:14:29 +0100 |
commit | 4a899c1a9e83ab9476b85522751081be434caa35 (patch) | |
tree | f1f6276c91beceecdfd9b09083d1c91ea8b41b60 /src/openvic-simulation/interface | |
parent | cd6875d5e0ca5e2545fd0e1647678cd18a6c81c2 (diff) |
Crime+event modifier loading + misc UI backend
Diffstat (limited to 'src/openvic-simulation/interface')
-rw-r--r-- | src/openvic-simulation/interface/GFX.cpp | 13 | ||||
-rw-r--r-- | src/openvic-simulation/interface/GFX.hpp | 3 |
2 files changed, 6 insertions, 10 deletions
diff --git a/src/openvic-simulation/interface/GFX.cpp b/src/openvic-simulation/interface/GFX.cpp index f4e2074..927b832 100644 --- a/src/openvic-simulation/interface/GFX.cpp +++ b/src/openvic-simulation/interface/GFX.cpp @@ -42,18 +42,15 @@ bool TextureSprite::_fill_key_map(key_map_t& key_map) { return ret; } -ProgressBar::ProgressBar() -: back_colour {}, back_texture_file {}, - progress_colour {}, progress_texture_file {}, - size {} {} +ProgressBar::ProgressBar() : back_colour {}, progress_colour {} {} bool ProgressBar::_fill_key_map(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(back_colour)), "colortwo", ONE_EXACTLY, expect_colour(assign_variable_callback(progress_colour)), - "textureFile1", ZERO_OR_ONE, expect_string(assign_variable_callback_string(back_texture_file)), - "textureFile2", ZERO_OR_ONE, expect_string(assign_variable_callback_string(progress_texture_file)), + "textureFile1", ZERO_OR_ONE, expect_string(assign_variable_callback_string(progress_texture_file)), + "textureFile2", ZERO_OR_ONE, expect_string(assign_variable_callback_string(back_texture_file)), "size", ONE_EXACTLY, expect_ivec2(assign_variable_callback(size)), "effectFile", ONE_EXACTLY, success_callback, @@ -84,12 +81,12 @@ bool LineChart::_fill_key_map(key_map_t& key_map) { return ret; } -MaskedFlag::MaskedFlag() : texture_file {}, mask_file {} {} +MaskedFlag::MaskedFlag() : overlay_file {}, mask_file {} {} bool MaskedFlag::_fill_key_map(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(texture_file)), + "textureFile1", ONE_EXACTLY, expect_string(assign_variable_callback_string(overlay_file)), "textureFile2", ONE_EXACTLY, expect_string(assign_variable_callback_string(mask_file)), "effectFile", ONE_EXACTLY, success_callback, "allwaystransparent", ZERO_OR_ONE, success_callback, diff --git a/src/openvic-simulation/interface/GFX.hpp b/src/openvic-simulation/interface/GFX.hpp index 2422e24..ff27613 100644 --- a/src/openvic-simulation/interface/GFX.hpp +++ b/src/openvic-simulation/interface/GFX.hpp @@ -117,11 +117,10 @@ namespace OpenVic::GFX { OV_DETAIL_GET_TYPE }; - class MaskedFlag final : public Sprite { friend std::unique_ptr<MaskedFlag> std::make_unique<MaskedFlag>(); - std::string PROPERTY(texture_file) + std::string PROPERTY(overlay_file) std::string PROPERTY(mask_file); protected: |