aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/interface/GFX.cpp
diff options
context:
space:
mode:
author hop311 <hop3114@gmail.com>2024-01-22 21:02:58 +0100
committer hop311 <hop3114@gmail.com>2024-01-23 23:14:53 +0100
commit268a6948c0400905dfc335427395519689f067f5 (patch)
treeb30e9b5774130552fe97e27deaf0370d83920c43 /src/openvic-simulation/interface/GFX.cpp
parentd4e597da089a81f719a9c33b46111d1c2c590124 (diff)
Added reserve_more, expect_dictionary_key[s|_map]_reserve_length[_and_default]reserve_more
Diffstat (limited to 'src/openvic-simulation/interface/GFX.cpp')
-rw-r--r--src/openvic-simulation/interface/GFX.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/openvic-simulation/interface/GFX.cpp b/src/openvic-simulation/interface/GFX.cpp
index d7b9042..0ec2954 100644
--- a/src/openvic-simulation/interface/GFX.cpp
+++ b/src/openvic-simulation/interface/GFX.cpp
@@ -7,8 +7,9 @@ using namespace OpenVic::NodeTools;
Font::Font(std::string_view new_identifier, colour_argb_t new_colour, std::string_view new_fontname)
: HasIdentifierAndAlphaColour { new_identifier, new_colour, false }, fontname { new_fontname } {}
-node_callback_t Sprite::expect_sprite(callback_t<std::unique_ptr<Sprite>&&> callback) {
- return expect_dictionary_keys(
+node_callback_t Sprite::expect_sprites(length_callback_t length_callback, callback_t<std::unique_ptr<Sprite>&&> callback) {
+ return expect_dictionary_keys_and_length(
+ length_callback,
"spriteType", ZERO_OR_MORE, _expect_instance<Sprite, TextureSprite>(callback),
"progressbartype", ZERO_OR_MORE, _expect_instance<Sprite, ProgressBar>(callback),
"PieChartType", ZERO_OR_MORE, _expect_instance<Sprite, PieChart>(callback),