Updated the display controllers to use state controls

This commit is contained in:
2023-03-01 08:43:59 -08:00
parent 2121124f79
commit 3a4c87fc37
7 changed files with 79 additions and 137 deletions

View File

@ -58,7 +58,7 @@ namespace Dawn {
* Creates a new state property and listens for its change.
* @param initial The initial value of this state.
*/
StateProperty(V initial) : _realValue(initial) {}
StateProperty(V initial) : _realValue(initial), previous(initial) {}
const StateProperty& operator += (const V &value) {
this->setInternal(this->_realValue + value);
@ -78,6 +78,10 @@ namespace Dawn {
return *this;
}
const V operator->() const {
return this->_realValue;
}
operator V() const {
return this->_realValue;
}