pioneerspacesim/pioneer — pull request #2830 by robn (2014-03-31 03:33:26+00:00)
Title: UI: animations

Here's a simple animation engine for the UI. It allows widgets to have their position and/or opacity automatically updated according to some easing function.

Currently its used in two places - the main menu, and message boxes. To test the latter, try to buy something that you can't afford. You'll see it.

I'm not 100% happy with it, but its already very usable so its worth merging now. Future work:

* Disable positional (ie mouse) input for animating widgets.
* Think about `EASING_ZERO` and `EASING_ONE` a bit more, particularly the former's ability to be "finished" yet leave the widget in its final state.
* Consider what should happen when an animation with a valid next animation gets reused (ie added after completion).
* Add jQuery-style shortcuts for common animations (eg `easeIn`, `slideOut`, etc)