diff --git a/ext/native/ui/ui_tween.h b/ext/native/ui/ui_tween.h index 41f061f262..04ba166890 100644 --- a/ext/native/ui/ui_tween.h +++ b/ext/native/ui/ui_tween.h @@ -54,7 +54,7 @@ public: const Value newFrom = Current(Position()); // Are we already part way through another transition? - if (!Finished()) { + if (time_now() < start_ + duration_) { if (newTo == to_) { // Already on course. Don't change. } else if (newTo == from_) { @@ -92,6 +92,16 @@ public: to_ = newFrom; } + const Value &FromValue() const { + return from_; + } + const Value &ToValue() const { + return to_; + } + Value CurrentValue() { + return Current(Position()); + } + protected: virtual Value Current(float pos) = 0;