Please sign in to comment.
Add initial animation support to libmythui.
The bulk of this code is from Jonatan <firstname.lastname@example.org> (many thanks!), with the major changes being:- - sundry formatting/style changes. - added OpenGL 2.0/ES support by way of full stackable transformation support (emulates the deprecated OpenGL push/pop matrix functionality). - removed the 'size' effect as this doesn't appear to work at the moment (easy enough to add back). - moved the Effects struct to a UIEffects class for additional functionality. - converted the xml 'zoom' scale to 0-100 (and beyond) rather then 0.0-1.0 (still uses a float internally). - added separate verticalzoom and horizontalzoom effects. You can use one in isolation or both together for separate effects and there is technically nothing stopping you from using them together with normal 'zoom' - though the results will be undefined. - added a 'centre' attribute that dictates the centre used for both rotation and zooming. Available centres topleft, top, topright, left, middle, right, bottomleft, bottom and right. You cannot set a different centre for rotation and zoom. - reworked the xml structure in line with Stuart Morgan's suggested schema (see below). This currently only works with an OpenGL painter in the main interface (so no OSD yet) and is currently only triggered on 'AboutToShow' and 'AboutToHide' for windows (ie. no lower level widgets yet). Extending this should just be a matter of adding additional triggers in the correct slots. I'll add direct3d support to my long list of direct3d ToDo's. There are some obvious issues around deactivating looped animations and some animation effects based on pre-existing code (e.g. position? alpha?) appear to interfere with window behaviour (e.g. actions aren't processed until the animation is complete). The xml looks something like this:- <animation trigger="AboutToShow"> <section duration="500" centre="middle"> <alpha start="120" end="255" easingcurve="Linear" reversible="true" looped="true" /> <zoom start="0" end="100" easingcurve="OutCurve" duration="200" /> </section> </animation> This should allow for future improvements such as adding additonal sections for animations processed in sequence, paths and onCompletion style triggers. Attributes will use default values if missing:- trigger="AboutToShow" duration="500" centre="middle" start="0" (or equivalent) end="0" (or equivalent) easingcurve="Linear" reversible="false" looped="false"
- Loading branch information...
Showing with 631 additions and 41 deletions.
- +3 −0 mythtv/libs/libmythui/libmythui.pro
- +8 −1 mythtv/libs/libmythui/mythmainwindow.cpp
- +1 −0 mythtv/libs/libmythui/mythmainwindow.h
- +4 −0 mythtv/libs/libmythui/mythpainter.h
- +12 −0 mythtv/libs/libmythui/mythpainter_ogl.cpp
- +3 −0 mythtv/libs/libmythui/mythpainter_ogl.h
- +4 −0 mythtv/libs/libmythui/mythrender_opengl.h
- +18 −0 mythtv/libs/libmythui/mythrender_opengl1.cpp
- +4 −0 mythtv/libs/libmythui/mythrender_opengl1.h
- +89 −15 mythtv/libs/libmythui/mythrender_opengl2.cpp
- +7 −4 mythtv/libs/libmythui/mythrender_opengl2.h
- +5 −1 mythtv/libs/libmythui/mythscreentype.cpp
- +296 −0 mythtv/libs/libmythui/mythuianimation.cpp
- +86 −0 mythtv/libs/libmythui/mythuianimation.h
- +78 −19 mythtv/libs/libmythui/mythuitype.cpp
- +13 −1 mythtv/libs/libmythui/mythuitype.h
Oops, something went wrong.