Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/base/StarAnimatedPartSet.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2024-04-23 11:48:51 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2024-04-23 11:48:51 +1000
commit7136c929cea0ddf955ab69a8ff5a4394bedacea8 (patch)
treed17322f98b5614eadeb086dae70d6fbd81d84934 /source/base/StarAnimatedPartSet.cpp
parented3793ab004e1c6d21225f34c8369d12f6525334 (diff)
micro-opt NetworkedAnimator drawables
sort before creating drawables
Diffstat (limited to 'source/base/StarAnimatedPartSet.cpp')
-rw-r--r--source/base/StarAnimatedPartSet.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/base/StarAnimatedPartSet.cpp b/source/base/StarAnimatedPartSet.cpp
index 9133921..5ffc68f 100644
--- a/source/base/StarAnimatedPartSet.cpp
+++ b/source/base/StarAnimatedPartSet.cpp
@@ -106,7 +106,7 @@ StringList AnimatedPartSet::states(String const& stateTypeName) const {
return m_stateTypes.get(stateTypeName).states.keys();
}
-StringList AnimatedPartSet::parts() const {
+StringList AnimatedPartSet::partNames() const {
return m_parts.keys();
}
@@ -148,6 +148,14 @@ AnimatedPartSet::ActivePartInformation const& AnimatedPartSet::activePart(String
return part.activePart;
}
+StringMap<AnimatedPartSet::Part> const& AnimatedPartSet::constParts() const {
+ return m_parts;
+}
+
+StringMap<AnimatedPartSet::Part>& AnimatedPartSet::parts() {
+ return m_parts;
+}
+
void AnimatedPartSet::forEachActiveState(function<void(String const&, ActiveStateInformation const&)> callback) const {
for (auto const& p : m_stateTypes) {
const_cast<AnimatedPartSet*>(this)->freshenActiveState(const_cast<StateType&>(p.second));