diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-27 03:38:57 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-27 03:38:57 +1000 |
commit | 4585c9cafa87cad6b54397af7e9375cc31b72f89 (patch) | |
tree | befd016a13e95467197b2bd507198b53b262fead /source/base/StarAssets.cpp | |
parent | 14e23a17ccf7d556d98e7dc76f1e7ad81fa70e93 (diff) |
Lazy-loading of ImageOperation inside Directives
also fixed cases of drawables not staying centered after adding directives that scale
Diffstat (limited to 'source/base/StarAssets.cpp')
-rw-r--r-- | source/base/StarAssets.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/base/StarAssets.cpp b/source/base/StarAssets.cpp index 320f813..f805b16 100644 --- a/source/base/StarAssets.cpp +++ b/source/base/StarAssets.cpp @@ -844,6 +844,10 @@ shared_ptr<Assets::AssetData> Assets::loadImage(AssetPath const& path) const { return {}; StringMap<ImageConstPtr> references; StringList referencePaths; + + for (auto& directives : path.directives.list()) + directives.loadOperations(); + path.directives.forEach([&](auto const& entry, Directives const& directives) { addImageOperationReferences(entry.operation, referencePaths); }); // TODO: This can definitely be better, was changed quickly to support the new Directives. |