Commit Graph

20 Commits

Author SHA1 Message Date
that
c01391c123 gui: allow listbox to be used as menu and as read-only list
Also enable string insertion for list items.

Example how to make a menu item:
<listitem name="Lights on!">
	<action>
		<action function="setbrightness">255</action>
	</action>
</listitem>

If no <data> element and no actions on any items exist, the list is
read only and no item selection is possible.

Change-Id: Ib2668a982df2514484d44faa0396dd17550f39f3
2015-07-14 16:07:11 +02: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
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
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
that
fa30aca94a gui: fix condition handling for lists
Base class must be called first, otherwise the condition can never
again become true. Fixes font size switching in Material theme.

Change-Id: I160a733549495e1bde3cead56b0a3582f0dc744c
2015-02-13 01:22:22 +01: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
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
Vojtech Bocek
76ee903d84 Add support for TrueType fonts
* Keeps original font system in place
* Uses the same API as original font system:
   - You can render only one line at a time
   - You can only use one font and color for one gr_text* call
* Caches all rendered text, with a string cache limited to 400
  entries, then it trucates to 250, which results in memory
  usage hovering around 5-10MB

Change-Id: I36107b9dcd8d57bae4486fce8b8f64e49ef3d906
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
2014-10-14 15:06:56 +02:00
Matt Mower
fb1c4ffaaf Whitespace and minor code cleanup
This is by no means comprehensive, but is quite a bit better already.

Change-Id: Ibc8654a5dfb0eec39cbd0b64bdb52bb4fbfe2f7e
2014-06-04 09:13:37 -05:00
Vojtech Bocek
072205626c Cache results of GUIObject::isConditionTrue()
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>

Change-Id: Ia50f7c365b2dc0a65ee046bb42972e3594264878
2014-02-12 19:19:32 +01:00
Vojtech Bocek
ede51c528e Conditional -> GUIObject and make all gui objects children of GUIObject
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>

Change-Id: Ic0a7d6354dabe5919b83942f2f1aa0715625e522
2014-02-12 18:30:41 +01:00
Vojtech Bocek
5af8f3faca Add vibrations to Checkbox, Fileselect, Listbox and Partitionlist
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>

Change-Id: I7b0e27930857add1ac88671a71310bea56fc4e74
2014-02-08 02:22:23 +01:00
Vojtech Bocek
59e51a4349 Don't switch between fast and normal scroll during drag in listviews
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>

Change-Id: I925adda7f417c6e578f501babc8ef2bec638f66b
2014-01-29 19:15:56 +01:00
Vojtech Bocek
fafb0c541b Unify indentation and little clean-up in TWRP files
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
2013-08-24 07:56:48 -05:00
Dees_Troy
2673cec07a Move all AOSP code out of recovery binary
Improves license compatibility between GPL and Apache

Change-Id: I2b165aa575bb6213af6b07936f99610c113443f0
2013-04-04 18:57:34 +00:00
Dees_Troy
a13d74fc95 Add partition list GUI element
Add partition list GUI element and update backup, restore, mount,
storage selection, and wipe sections of GUI and partition manager
code to reflect the new GUI element. Update ORS engine to handle
new backup and restore setup.

Fix a bug with decrypt.
Add 1080x1920 layout.

Change-Id: Iaa2f44cb707167e66f935452f076ba00e68a2aa4
2013-03-30 08:56:39 -05:00
Dees_Troy
58f5cf0ab5 Copy fast scroll feature to listbox 2013-02-27 22:21:41 +00:00
Dees_Troy
e42845962d Minor fix for listbox code 2013-02-19 16:59:35 +00:00
Dees_Troy
eead985c57 Update listbox code 2013-02-15 14:31:58 -06:00
Dees_Troy
51a0e82eb2 TWRP-ify AOSP code
Pull in most TWRP sources
Stub out partition management code
Make it compile -- probably will not boot
Kind of a mess but have to start somewhere
2012-09-05 15:24:31 -04:00