Commit graph

103 commits

Author SHA1 Message Date
Jonathan Gordon
1bd072c92d FS#10853 - Skin support in the radio screen! Check CustomWPS for the new tags
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25964 a1c6a512-1295-4272-9138-f99709370657
2010-05-12 10:38:00 +00:00
Jonathan Gordon
efd1f4e49f Make it possible to move the UI viewport using conditional viewports.
%Vi|<label>|<Usual %Vi params>|  <- specify the possible viewports to use
%VI<label> <- make the UI viewport use the %Vi definition with the <label> label.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25826 a1c6a512-1295-4272-9138-f99709370657
2010-05-05 13:48:50 +00:00
Jonathan Gordon
4c65a1970e Make battery level (%bl) work with the bmp bars drawer like %pb and %pv
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25710 a1c6a512-1295-4272-9138-f99709370657
2010-04-25 11:32:51 +00:00
Alexander Levin
847a0fd56c Fix grammar in the comment (make code non offending :-)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25695 a1c6a512-1295-4272-9138-f99709370657
2010-04-21 19:59:49 +00:00
Jonathan Gordon
34cd2c31ae really fix "%pv|something else" this time
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25684 a1c6a512-1295-4272-9138-f99709370657
2010-04-20 07:17:59 +00:00
Jonathan Gordon
58a0393154 2 quick fixes
1) fix %pv| where the | is for a conditional break and not for long form %pv
2) only draw bmp-bars if they are enabled (by a conditional or always on.)


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25677 a1c6a512-1295-4272-9138-f99709370657
2010-04-19 08:43:42 +00:00
Jonathan Gordon
69710e54f1 fix escaped chars being displayed twice in the playlist viewer (i.e %> showing as >> )
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25663 a1c6a512-1295-4272-9138-f99709370657
2010-04-17 12:45:52 +00:00
Jonathan Gordon
99a2299654 allow %pb and %pv (long form) to be put inside conditionals (i.ee not eat the whole line).
If this causes your theme to break you need to add a # after the line.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25616 a1c6a512-1295-4272-9138-f99709370657
2010-04-13 07:32:00 +00:00
Jonathan Gordon
a1c0d5597f shuld fix red and yellow
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25585 a1c6a512-1295-4272-9138-f99709370657
2010-04-11 11:40:47 +00:00
Jonathan Gordon
4421746357 Rework how progressbars are managed so you can have as many bars in a viewport as you want (!).
Change %pv (volume) to be able to be drawn in the same style as %pb (using a line or a bmp). %pv - no change, %pv|bmp|x|y|width|height| exactly like %pb
DO NOT use %?pv|....| because it will draw when you dont want it to!


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25584 a1c6a512-1295-4272-9138-f99709370657
2010-04-11 11:18:45 +00:00
Jonathan Gordon
d2e2c2ad96 2 new tags:
%pS - track is starting.
%pE - track is ending. both can optionally have a number straight after to change how long that tag should stay true for (e.g %pS10 will stay true for the first 10s of the track)


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25239 a1c6a512-1295-4272-9138-f99709370657
2010-03-18 07:08:49 +00:00
Jonathan Gordon
d384f8d064 rearrange the skin loading to remove some code dupe
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25196 a1c6a512-1295-4272-9138-f99709370657
2010-03-15 07:35:27 +00:00
Jonathan Gordon
1a8f29ca33 fix the remote font not working when there is no .rsbs loaded
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25195 a1c6a512-1295-4272-9138-f99709370657
2010-03-15 07:12:33 +00:00
Jonathan Gordon
0f69a8152f fiddle with the skin debug output so the load lines arnt shown unless debugwps is enabled
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25162 a1c6a512-1295-4272-9138-f99709370657
2010-03-14 11:32:03 +00:00
Teruaki Kawashima
1fbdd91333 skin: don't calculate id3->elapsed+state->ff_rewind_count each time. remove trailing spaces.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25045 a1c6a512-1295-4272-9138-f99709370657
2010-03-06 14:14:44 +00:00
Jonathan Gordon
a9b5f4d810 cleanup statusbar+base skin relationship...
* remove the "custom" option from the statusbar setting. if a sbs file is set then statusbar setting is ignored, no other user visible change there.
* new tag, %wi  - use to draw the inbuilt statusbar in the current viewport


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25038 a1c6a512-1295-4272-9138-f99709370657
2010-03-06 00:29:46 +00:00
Jonathan Gordon
d9adfa1c73 FS#11072 - display the filename of the skin begin parsed in the debug output
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25003 a1c6a512-1295-4272-9138-f99709370657
2010-03-03 08:30:31 +00:00
Jonathan Gordon
779d4e3ff7 remove some gremlins... viewport_set_*() sets the font to the UI font for that screen which is bad for the parser.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25002 a1c6a512-1295-4272-9138-f99709370657
2010-03-03 05:57:15 +00:00
Jonathan Gordon
25d9771ebc make %Fl (font load) more consistant with bmp loading and require the whole filename, i.e require the .fnt.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25001 a1c6a512-1295-4272-9138-f99709370657
2010-03-03 05:43:02 +00:00
Jonathan Gordon
f37b5078f6 undo that last undo, make the font loader more forgiving to user errors
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24994 a1c6a512-1295-4272-9138-f99709370657
2010-03-03 00:53:07 +00:00
Jonathan Gordon
9e611b1b00 revert r24989 ad r24990 which are cuasing segfaults... they were working fine for me though :( (stupid font stuff is cursed!)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24993 a1c6a512-1295-4272-9138-f99709370657
2010-03-02 21:47:35 +00:00
Jonathan Gordon
04e0d6c12c fix %pb when the height isnt given and it is in a viewport with a user font (so the height is calculated on the font height at display time)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24991 a1c6a512-1295-4272-9138-f99709370657
2010-03-02 08:47:45 +00:00
Jonathan Gordon
3f09d7eed1 fix red
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24990 a1c6a512-1295-4272-9138-f99709370657
2010-03-02 08:32:55 +00:00
Jonathan Gordon
34f51ccb04 * Make the user font count more sane
* font 2-9 in the skins will always be user fonts in the skins
* init the skinfonts array so it doesnt think id 'x' is used already
* make the parser work with FONT_UI untill the very end, even on remote fonts


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24989 a1c6a512-1295-4272-9138-f99709370657
2010-03-02 08:24:50 +00:00
Thomas Martitz
3b52937c8a Revert r24958. It didn't fix anything (in fact, the problem described didn't exist). Increase MAXFONTS by 1 to allow for remote screen targets to load fonts 2-9.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24983 a1c6a512-1295-4272-9138-f99709370657
2010-03-01 15:16:05 +00:00
Jonathan Gordon
6434e760fc move a #ifdef so the full amount of user choosable skin fonts are avilable on non remote targets (i.e 2-9 inclusive)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24958 a1c6a512-1295-4272-9138-f99709370657
2010-02-28 08:48:04 +00:00
Jonathan Gordon
8717c1eaa1 redo r24943. the font mappings are not needed once the skin is finished parsing so using the skin buffer there is a waste and overcomplicates things.
Also that commit breaks plain %pb so make sure you dont use %pb inside a viewport with a font number > 1


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24957 a1c6a512-1295-4272-9138-f99709370657
2010-02-28 08:36:13 +00:00
Thomas Martitz
226308663f Store the list of fonts in a linked list instead of in a static array (together with the base filename) and load all fonts in a second step. This aids debugging missing fonts, skips fonts that are not used in viewports, and is preparation of a resizable (on boot) skin buffer.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24943 a1c6a512-1295-4272-9138-f99709370657
2010-02-27 16:51:51 +00:00
Jonathan Gordon
466e5d9aa4 2 new tags for the base skin.
%Lt - the title text for the current list
%Li - the icon number. Same order as the CustomIcons list, except the first icon is the "no icon" icon.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24917 a1c6a512-1295-4272-9138-f99709370657
2010-02-26 03:45:41 +00:00
Jonathan Gordon
31fb4f6ff6 Change how touchscreen regions work slightly... "It modifies the behaviour of touch buttons to be more similar to the way gui buttons operate in desktop applications. Upon a touch press event, the button at the touch position is armed. Upon a touch repeat or release, the button at the touch position is triggered only if it is armed. Upon release (and wps entry), all buttons are disarmed. E.g. when you touch press on an empty area, then while pressing drag your finger on a button, then release the button, the button is not triggered."
Author: Jens Theeß 
Flyspray: FS#10982


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24876 a1c6a512-1295-4272-9138-f99709370657
2010-02-24 06:19:25 +00:00
Jonathan Gordon
6c4b80c67b make the parser spit out filenames of images it cant load
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24875 a1c6a512-1295-4272-9138-f99709370657
2010-02-24 06:15:55 +00:00
Jonathan Gordon
0acb38b61c some minor changes to checkwps, shouldn't change anything
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24874 a1c6a512-1295-4272-9138-f99709370657
2010-02-24 05:58:16 +00:00
Teruaki Kawashima
d151371836 correct checking size in function get_image_filename.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24844 a1c6a512-1295-4272-9138-f99709370657
2010-02-22 06:00:49 +00:00
Thomas Martitz
a31624e76e Fix the mechanism to fail to parse skins if images fail to load and fix having no backdrop at all (neither %X nor backdrop setting, DancePuffDuo was broken).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24814 a1c6a512-1295-4272-9138-f99709370657
2010-02-21 19:29:33 +00:00
Jonathan Gordon
f85103e8f2 remote multifont fixes. it shoud be working again (blame AlexP! he made me break it last week!)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24812 a1c6a512-1295-4272-9138-f99709370657
2010-02-21 19:10:09 +00:00
Jonathan Gordon
ccd50dd2d7 and actually fix multifont on remote lcd targets also
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24780 a1c6a512-1295-4272-9138-f99709370657
2010-02-19 23:54:36 +00:00
Jonathan Gordon
90d9e66920 fix possible out-of-bounds error on remote lcd targets if they try loading a font to id==2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24779 a1c6a512-1295-4272-9138-f99709370657
2010-02-19 23:49:17 +00:00
Jonathan Gordon
877d378710 Reuse the backdrop buffers if 2 skins use the same backdrop (on the same screen of course)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24690 a1c6a512-1295-4272-9138-f99709370657
2010-02-16 05:24:27 +00:00
Jonathan Gordon
1c2aa35371 FS#10984 - multifont! 2 major additions:
1) seperate UI font for the remote and main displays
2) allow individual skins to load additional fonts for use in the skin (Uo to 7 extra in this first version) see CustomWPS for info on how to load a font in the skins.

Code should always use FONT_UI+screen_number to get the correct user font


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24644 a1c6a512-1295-4272-9138-f99709370657
2010-02-14 06:26:16 +00:00
Jonathan Gordon
eee5423fe1 skin rework (FS#10922) notable changes:
- simplify the setting/skin relationship. settings are used as the fallback if it's not specified in the skin
- backdrop buffers are now in the skin buffer (which has also increased slightly to accomodate 1 backdrop for each skin and 2 full colour screens for bmps (up for 1.5))
- if no %X is specified in a skin then the backdrop setting will be used. use %Xd to explicitly disable a skin from displaying a backdrop
- the base skin can now specify a backdrop.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24366 a1c6a512-1295-4272-9138-f99709370657
2010-01-29 07:52:13 +00:00
Bertrik Sikken
552835ebe2 Add a missing #include, make a function static, make touchpad_set_buttonlight implementation and declaration consistent
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24281 a1c6a512-1295-4272-9138-f99709370657
2010-01-18 21:20:36 +00:00
Jonathan Gordon
51630cbac1 outright reject any tags which need a special parser in the wps playlist viewer. There is no intention of even trying to support them and without this possible upcoming changes will cause crashes if any of those tags are used.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24229 a1c6a512-1295-4272-9138-f99709370657
2010-01-15 01:26:57 +00:00
Jonathan Gordon
a1b97086c5 fix typo
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24223 a1c6a512-1295-4272-9138-f99709370657
2010-01-13 07:47:53 +00:00
Jonathan Gordon
dc0ba917fa FS#10898 - Add a playlist viewer to the WPS. http://www.rockbox.org/wiki/CustomWPS#Playlist_viewer for an exaplanation how to use it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24220 a1c6a512-1295-4272-9138-f99709370657
2010-01-13 06:02:38 +00:00
Jonathan Gordon
669afd093d fix checkwps
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24194 a1c6a512-1295-4272-9138-f99709370657
2010-01-07 07:47:19 +00:00
Jonathan Gordon
91e6b06be9 RTL language enhancements by Tomers Shalev and I.
3 new tokens:
%ax - the next token should follow the language direction (what that means is defined by the individual tokens)
%aL - align left on LTR language (same as %al), right on RTL languages
%aR - align right on LTR language (same as %ar), left on RTL languages

This commit adds %ax support to the %V and %Cl tokens. 


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24193 a1c6a512-1295-4272-9138-f99709370657
2010-01-07 07:34:15 +00:00
Tomer Shalev
e15a0c9118 WPS: Use helper function to parse int value on album-art directive
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24121 a1c6a512-1295-4272-9138-f99709370657
2009-12-29 18:14:31 +00:00
Bertrik Sikken
0201a19d2d Make read-only struct const
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24085 a1c6a512-1295-4272-9138-f99709370657
2009-12-20 18:04:07 +00:00
Bertrik Sikken
5698674ece Code police: add missing header file, make some local functions static
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24083 a1c6a512-1295-4272-9138-f99709370657
2009-12-20 16:28:15 +00:00
Tomer Shalev
8db32ddfee Skin parser: Use parse_list() when possible
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23846 a1c6a512-1295-4272-9138-f99709370657
2009-12-04 13:10:06 +00:00