fix(animation): Use defined base values

This commit is contained in:
Michael Carlberg 2016-11-19 12:23:31 +01:00
parent 489d429644
commit 30c1cb3d50

View File

@ -44,14 +44,17 @@ namespace drawtypes {
name = string_util::ltrim(string_util::rtrim(name, '>'), '<'); name = string_util::ltrim(string_util::rtrim(name, '>'), '<');
auto anim_defaults = load_optional_icon(conf, section, name);
if (required) if (required)
frames = conf.get_list<string>(section, name); frames = conf.get_list<string>(section, name);
else else
frames = conf.get_list<string>(section, name, {}); frames = conf.get_list<string>(section, name, {});
for (size_t i = 0; i < frames.size(); i++) for (size_t i = 0; i < frames.size(); i++) {
vec.emplace_back( vec.emplace_back(forward<icon_t>(load_optional_icon(conf, section, name + "-" + to_string(i), frames[i])));
forward<icon_t>(load_optional_icon(conf, section, name + "-" + to_string(i), frames[i]))); vec.back()->copy_undefined(anim_defaults);
}
auto framerate = conf.get<int>(section, name + "-framerate", 1000); auto framerate = conf.get<int>(section, name + "-framerate", 1000);