mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
fixup! UI: Ensure tweens always complete.
This commit is contained in:
parent
9f000ddf35
commit
c29ae5ff56
1 changed files with 11 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue