Commit Graph

8 Commits

Author SHA1 Message Date
that
10ec0175c8 gui: make kinetic scrolling deceleration more awesome
Change-Id: Ia674676c847e429c41ddbe6de3e1778c3d5c8302
2015-02-15 23:52:28 +01:00
that
9876ac3361 gui: support scrollable lists without headers
If the <header> element doesn't exist, the header is not drawn.

- minuitwrp: add function for clipping all drawing to a rectangle
...and another one to cancel it.

Change-Id: If0f688a5debee6ebd9c457999fe571705a42c5cc
2015-02-15 22:12:29 +01:00
that
f6ed8fc1f5 gui: make resources type safe
- add string, int, color and resource loading helpers
- use typed resource classes, and some cleanup in loading code
- remove abstract GetResource() to enforce type safe access
- add height and width query methods to resources and use them
- minor cleanup
- simplify LoadPlacement

Change-Id: I9b81785109a80b3806ad6b50cba4d893b87b0db1
2015-02-15 20:36:40 +01:00
Ethan Yonker
63e414fc8a Scale the GUI to fit the screen
With this patch set, if needed, we scale the images during early
boot. TTF support is needed to properly scale the font. No font
scaling is done on the old style fixed width font used in the
console.

Special thanks to _that for figuring out the scaling and blending
function calls to make this possible.

Change-Id: If2f79bef16d6db2e1298bfc3d00c9bcca2bee37a
2015-02-10 14:11:50 -06:00
Ethan Yonker
1b6199f8ed Remove deletes for images from scroll list GUI Elements
Resources are deleted by ~PageSet and do not need to be deleted
by the the scrollable list elements. This fixes a crash when
reloading the theme.

Also remove some deletes for items that should not be deleted in
button and input GUI elements.

Change-Id: Ie1c1b85c81c10f648d085746a5fdba6220468a5f
2015-02-10 13:42:48 -06:00
that
de72b6d4d8 gui: avoid high CPU usage while waiting for input
- add a timeout to ev_get
- set timeout to 1 second when idle
- delay timeout for 15 frames to keep animation objects working
- stop kinetic scrolling immediately at end of list

Change-Id: I77138055c464b65b71e296f9c7ef63ea06809bc1
2015-02-09 16:53:21 +01:00
that
ae4b12eaef gui: make kinetic scrolling more natural
Speeding up scrolling after releasing is distracting, get rid of it.
Instead reduce friction to its previous value.

Change-Id: I5c99cc71b631747697e967bd75669aa3d908c637
2015-02-06 00:23:05 +01:00
Ethan Yonker
0a3a98f892 Unify scrollable list code
The goal of this patch set is to eliminate the code duplication
caused by copy/paste of the code in the file selector, listbox,
and partition list GUI elements. Those classes will now utilize a
single GUIScrollList class that will handle rendering and
scrolling.

Change-Id: I0cb98ab36cf47178296034293435225658c779cd
2015-02-05 14:51:24 -06:00