Updated more scene item coponents to state system

This commit is contained in:
2023-03-01 09:25:07 -08:00
parent 3a4c87fc37
commit 7838e1b92d
11 changed files with 256 additions and 360 deletions

View File

@ -18,8 +18,6 @@ namespace Dawn {
*/
void setInternal(V val) {
if(val == this->_realValue) return;// TODO: can I omit this? kinda bad tbh.
this->previous = this->_realValue;
this->_realValue = val;
// Run the teardowns
auto itTeardown = this->_effectTeardowns.begin();
@ -29,6 +27,10 @@ namespace Dawn {
}
this->_effectTeardowns.clear();
// Update the values
this->previous = this->_realValue;
this->_realValue = val;
// Notify the effect listeners
auto itEffect = this->_effectListners.begin();
while(itEffect != this->_effectListners.end()) {