Code review comment for lp:~samuel-buffet/entertainer/new-scrollmenu

Revision history for this message
Samuel Buffet (samuel-buffet) wrote :

Hi,

Finally, I think this branch is robust enough to be proposed.

The goal of this new scroll menu was to improve animations and to make it pointer reactive.

So, the scroll menu core mechanism has been created from scratch but I kept some old interface methods.

A new LoopedPath behaviour was created. It's more or less a 2 knots clutter path behaviour driven by an index. Index=0 place the actor on the starting knot and Index=1 place it on the end knot. Index can be whatever value we want but the actor will always be positioned on the 2 knots "infinite" path (ie if we apply the behaviour from idx=0 to idx=2 then the actor will move 2 times along the segment).

I've also added a MotionBuffer Class to make some calculations (distances, speeds) when we move the mouse. I've placed it its own file because this is something we can use later on other widgets (probably other menus). Right now it does more than needed by the ScrollMenu widget (only a vertical speed was needed).

I've also added a hide/show cursor mechanism (the one I discussed with Matt previously).

New interaction possible with the mouse are :

click on one menu item => moves it to central position
click on the menu item in central position => *enter* that menu
click + keeping the mouse button pressed and moving => we can slowly move the menu or give it an impulse to "turn" with a first try of kinetic effect based on the mouse speed motion.

The main screen has been modified to react to the new signals.

Cheers,
Samuel

« Back to merge proposal