Commit Graph

12 Commits

Author SHA1 Message Date
that
8d46c09ccf gui: kinetic scrolling for console
- Rebase console on ScrollList
- Add fastscroll bar to console
- ScrollList now has a mode that ignores selections
- Increase kinetic scrolling speed for lists showing many items

Change-Id: I6298d717d2e403f3e85e2c633d53c4284a066012
2015-03-05 04:50:33 +01:00
that
0af7795690 gui: introduce virtual RenderItem method in ScrollList
- so derived lists can draw whatever they want (multi-line etc.)
- replace GetListItem with RenderItem
- minor cleanup

Change-Id: I062e0a354f1c18ce0a5232b7542c4987b480e232
2015-03-05 04:46:10 +01:00
that
a999821ad4 gui: proportional scrollbars
- Attribute "recth" in the <fastscroll> element is now the
*minimum* height for the scrollbar.
- Dragging the scrollbar moves the list.
- Touching outside the scrollbar jumps to the relative position.

Change-Id: Ic1f20b5ec68cf49e5be56be34f0c58c0f474618b
2015-02-21 15:34:19 +01:00
Ethan Yonker
21ff02a693 GUI: Support styles in xml to reduce xml file size
Also allow sliders to have their own text label instead of
requiring a whole separate text object for the label in the xml.

Change-Id: I6e314efb4bb454d496555ff7e003d743063a1308
2015-02-21 08:14:24 -06:00
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