summaryrefslogtreecommitdiffstats
path: root/gui/resources.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2015-06-01gui: move retainaspect handling to the resource ctorsthat1-12/+8
LoadResources should only decide on the resource type, everything else is handled by the resources themselves. Change-Id: I30f68293960c23560979f650efc4393992cf5824
2015-03-11gui: support string resourcesthat1-9/+16
storing strings in a map (for fast lookup) in resource manager To define a string resource in <resources>: <string name="foo">Hello</string> To use a string, e.g.: <text>%@foo%</text> Not yet done: language-specific resources (should be solved not only for strings, but for all kinds of resources - e.g. for localized images) Change-Id: I3ba5cf5298c09e0d28a83973e9662f179271b33f
2015-03-11gui: allow specifying resource type in element namethat1-8/+8
e.g. '<image ...>' instead of '<resource type="image" ...>' Change-Id: I5ce04ae0845351c8a4640d12e36f1aaf32e1ebc9
2015-03-11gui: type safe resources part 2that1-27/+51
- separate collections for fonts, images, animations - no more ugly casts - fix crash if main ui.xml did not define any resources but include did - don't stop loading resources if one "type" attribute is missing Change-Id: I70c1c9ca66ca65d9fba1ba3eded34f3d8a07488e
2015-02-15gui: make resources type safethat1-1/+2
- 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-10Scale the GUI to fit the screenEthan Yonker1-37/+76
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-01-22Use /twres instead of /res for theme resourcesDees Troy1-1/+1
AOSP and other ROM trees now do a rm -rf of the res folder during the ramdisk creation process that removes the TWRP resources. Using /twres instead of /res works around this issue making TWRP more compatible with AOSP and other build trees. Change-Id: I0d4c7e06ca381ac5aa0069b6f2b8c47f7dec49e7
2015-01-18gui: clean up error handling in resource managerthat1-61/+24
Change-Id: Ib94e661ab0c608deb2d119168709c85a9a44b2fa
2014-12-12Improve resource error loggingEthan Yonker1-10/+21
Actually display the name of the item or the filename of the item that we were unable to load in the log to make it easier to determine what went wrong. Change-Id: I027b35aab286e4d0f1957bcfb28ed40d81f9bbb2
2014-11-16Thanks to _that, return null if vector is emptybigbiff1-1/+0
Change-Id: Idc44455dd0c971c876ae283528c4367a82e145bd
2014-10-14Add support for TrueType fontsVojtech Bocek1-6/+61
* 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-07-28Allow ui.xml to include additional xml files to readEthan Yonker1-0/+5
Use common portrait and landscape xml files based on resolution defined by the device. Change-Id: Iec528f9d846d49857ff98de1ac201e25dbb60339
2014-06-04Whitespace and minor code cleanupMatt Mower1-1/+1
This is by no means comprehensive, but is quite a bit better already. Change-Id: Ibc8654a5dfb0eec39cbd0b64bdb52bb4fbfe2f7e
2013-08-24Unify indentation and little clean-up in TWRP filesVojtech Bocek1-160/+158
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
2013-04-04Move all AOSP code out of recovery binaryDees_Troy1-9/+8
Improves license compatibility between GPL and Apache Change-Id: I2b165aa575bb6213af6b07936f99610c113443f0
2012-09-05TWRP-ify AOSP codeDees_Troy1-0/+280
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