Support and General Use > Theming and Appearance Customization

Help with modifying the c200 "Nature" theme?

(1/3) > >>

OldiesButGoodies:
I really like the "Nature" theme for my player, but I wanted to edit it to include a couple more features.

I added in a line for the current time and date, and also added in the VU meter. I read on the Wiki pages how to make the cover-art only appear when the "hold" button is pressed, but I couldn't make that work. If there is cover-art present then none of the other info shows up.

How can I modify this so that cover-art only shows when the "hold" button is switched to ON?

Here's my "Nature2" WPS file:


--- Code: ---%wd
%X|wpsbackdrop-132x80x16.bmp|
%xl|A|lock-132x80x16.bmp|125|1|2|
%xl|B|battery-132x80x16.bmp|1|1|16|
%xl|C|volume-132x80x16.bmp|66|3|26|
%xl|D|shuffle-132x80x16.bmp|43|1|
%xl|E|repeat-132x80x16.bmp|23|1|4|
%xl|F|playmode-132x80x16.bmp|2|60|5|
%Cl|3|14|c40|c40|
%pb|pb-132x80x16.bmp|12|61|118|5|
%?C<%C%Vda|%Vdb>

#Images
%?mh<%xdAa|%xdAb>
%?bp<%?bc<%xdBa|%xdBb>|%?bl<|%xdBc|%xdBd|%xdBe|%xdBf|%xdBg|%xdBh|%xdBi|%xdBj|%xdBk|%xdBl|%xdBm|%xdBn|%xdBo|%xdBp>>
%?pv<%xdCa|%xdCb|%xdCc|%xdCd|%xdCe|%xdCf|%xdCg|%xdCh|%xdCi|%xdCj|%xdCk|%xdCl|%xdCm|%xdCn|%xdCo|%xdCp|%xdCq|%xdCr|%xdCs|%xdCt|%xdCu|%xdCv|%xdCw|%xdCx|%xdCy|%xdCz>
%?ps<%xdD>
%?mm<|%xdEa|%xdEb|%xdEc|%xdEd>
%?mp<%xdFa|%xdFb|%xdFc|%xdFd|%xdFe>

#NowPlaying
%Vl|b|0|11|-|49|1|-|-|
%s%ac%?in<%in.> %?it<%it|%fn>
%s%ac%t5%?ia<%ia|%?d2<%d2|...>>;%s%ac%t5%?id<%id|%?d1<%d1|...>>
%t0.50 %?mp<%al %fc/%fbkb %ar-:--/-:-- |%al %fc/%fbkb%ar%pc/%pt |%al %fc/%fbkb%ar%pc/%pt |%al %fc/%fbkb%ar%pc/%pt |%al Seeking%ar%pc/%pt >;%t0.50 %?mp<%al %fc/%fbkb %ar-:--/-:-- |%al %fc/%fbkb%ar%pc/%pt |%al %fc/%fbkb           |%al %fc/%fbkb%ar%pc/%pt |%al Seeking%ar%pc/%pt >
%s%acNext: %?It<%It|%?Fn<%Fn|?>>
%ac%ca.%cy/%cm/%cd  %cl:%cM:%cS %cp
%Vl|b|0|68|-|12|1|-|-|
%V|0|68|132|12|1|007788|000000|
%pm

--- End code ---


And for those that want to try this here's my "Nature2.cfg" file, becaue it requires a smaller font:


--- Code: ---wps: /.rockbox/wps/Nature2.wps
font: /.rockbox/fonts/10-Sazanami-Mincho.fnt
foreground color: CCCCCC
background color: 000000
statusbar: on
backdrop: /.rockbox/backdrops/Nature.bmp
line selector start color: 9efdb3
line selector end color: 50825b
selector type: bar (gradient)
iconset: /.rockbox/icons/Nature_small.bmp
viewers iconset: /.rockbox/icons/Nature_small_viewers.bmp
line selector text color: 000000
filetype colours: -

--- End code ---

One more question, it's never clear in the WPS documentation on just how the X-Y coordinates are laid out. I have, by tedious trial and error, discovered that 0,0 is the top-left, 132,80 (for these players) is the lower-right corner. Or is that 131,79? It is also not clear in any of the documentation on whether "height" for any parameters listing that is a negative Y value or if it is positive and subtracted. Does "height" start from the Y position and then go downward? Meaning, if you have a Y location of 100, and then have a "height" of 10, then the end location is 90? Or is that 110?

p.s. There's also a display problem with the "graphical equalizer" for this series of players, the last frequency range is cut off at the bottom where you can't even see it, but you can blindly change it. That feature needs to be compressed vertically in order to be able to be used at all on c200 players.

edit: put the sections in code tags because the formatting screwed up.

karashata:

--- Quote from: OldiesButGoodies on October 13, 2008, 02:52:40 PM ---I really like the "Nature" theme for my player, but I wanted to edit it to include a couple more features.

I added in a line for the current time and date, and also added in the VU meter. I read on the Wiki pages how to make the cover-art only appear when the "hold" button is pressed, but I couldn't make that work. If there is cover-art present then none of the other info shows up.

How can I modify this so that cover-art only shows when the "hold" button is switched to ON?

Here's my "Nature2" WPS file:


--- Code: ---%wd
%X|wpsbackdrop-132x80x16.bmp|
%xl|A|lock-132x80x16.bmp|125|1|2|
%xl|B|battery-132x80x16.bmp|1|1|16|
%xl|C|volume-132x80x16.bmp|66|3|26|
%xl|D|shuffle-132x80x16.bmp|43|1|
%xl|E|repeat-132x80x16.bmp|23|1|4|
%xl|F|playmode-132x80x16.bmp|2|60|5|
%Cl|3|14|c40|c40|
%pb|pb-132x80x16.bmp|12|61|118|5|
%?C<%C%Vda|%Vdb>

#Images
%?mh<%xdAa|%xdAb>
%?bp<%?bc<%xdBa|%xdBb>|%?bl<|%xdBc|%xdBd|%xdBe|%xdBf|%xdBg|%xdBh|%xdBi|%xdBj|%xdBk|%xdBl|%xdBm|%xdBn|%xdBo|%xdBp>>
%?pv<%xdCa|%xdCb|%xdCc|%xdCd|%xdCe|%xdCf|%xdCg|%xdCh|%xdCi|%xdCj|%xdCk|%xdCl|%xdCm|%xdCn|%xdCo|%xdCp|%xdCq|%xdCr|%xdCs|%xdCt|%xdCu|%xdCv|%xdCw|%xdCx|%xdCy|%xdCz>
%?ps<%xdD>
%?mm<|%xdEa|%xdEb|%xdEc|%xdEd>
%?mp<%xdFa|%xdFb|%xdFc|%xdFd|%xdFe>

#NowPlaying
%Vl|b|0|11|-|49|1|-|-|
%s%ac%?in<%in.> %?it<%it|%fn>
%s%ac%t5%?ia<%ia|%?d2<%d2|...>>;%s%ac%t5%?id<%id|%?d1<%d1|...>>
%t0.50 %?mp<%al %fc/%fbkb %ar-:--/-:-- |%al %fc/%fbkb%ar%pc/%pt |%al %fc/%fbkb%ar%pc/%pt |%al %fc/%fbkb%ar%pc/%pt |%al Seeking%ar%pc/%pt >;%t0.50 %?mp<%al %fc/%fbkb %ar-:--/-:-- |%al %fc/%fbkb%ar%pc/%pt |%al %fc/%fbkb           |%al %fc/%fbkb%ar%pc/%pt |%al Seeking%ar%pc/%pt >
%s%acNext: %?It<%It|%?Fn<%Fn|?>>
%ac%ca.%cy/%cm/%cd  %cl:%cM:%cS %cp
%Vl|b|0|68|-|12|1|-|-|
%V|0|68|132|12|1|007788|000000|
%pm

--- End code ---

--- End quote ---

You'll need to change the code that displays the viewports for whether or not album art is present to read "%?C<<%?mh<%C%Vda|%Vdb>>" (without the quotes, of course).  You'll also need to define viewports "a", since the only viewports you have defined are "b".


--- Quote from: OldiesButGoodies on October 13, 2008, 02:52:40 PM ---One more question, it's never clear in the WPS documentation on just how the X-Y coordinates are laid out. I have, by tedious trial and error, discovered that 0,0 is the top-left, 132,80 (for these players) is the lower-right corner. Or is that 131,79? It is also not clear in any of the documentation on whether "height" for any parameters listing that is a negative Y value or if it is positive and subtracted. Does "height" start from the Y position and then go downward? Meaning, if you have a Y location of 100, and then have a "height" of 10, then the end location is 90? Or is that 110?

--- End quote ---

The bottom-right corner would be 131,79, the y-position is the top of the viewport being defined, and the height goes down relative to the top of the screen, increasing the y value, so from a y-position of 100, with a height of 10, the bottom would be 110.

OldiesButGoodies:
Thanks for the clarifications and help.

I modified this line:

%?C<%C%Vda|%Vdb>

to

%?C<<%?mh<%C%Vda|%Vdb>>

That's what I tried before your help, but it didn't act like it was supposed to, no doubt due to my not defining that "a" viewport. I'm green when it comes to using the WPS syntax.


So then in this section I added the first "Vl|a|..." line, as per your advice:

#NowPlaying
%Vl|a|0|11|-|69|1|-|-|
%Vl|b|0|11|-|49|1|-|-|


But when I run it through the debugwps simulator it just ends on this error:


--- Quote ---Viewport 0 - +0+0 (132x80)
Line  0 (num_sublines=1, first_subline=0)
    Subline 0: first_token=  0, last_token=  4, progressbar

ERR: Failed parsing on line 12 : ERR: Conditional syntax error after token 4: conditional start, next cond: 0"

--- End quote ---

Line 12 in the code is just after that conditional checking for cover-art, which is just a blank line.

When run in RockBox it uses the default theme due to that error.

Are my edits/additions in the wrong places?

I made the viewport for displaying cover-art larger (68 pixels tall) so that I can display larger images when the hold button is on. Could that be causing the error because it's overlapping the viewports for the progress bar and VU meter? (There's lots of fiddly info like this that's left out of the documentation that leads to many hours and days of trial and error.)

karashata:
I think you may need to move the cover art check to a position after the rest of the images...

So move the line "%?C<<%?mh<%C%Vda|%Vdb>>" to the line after where all the images are displayed and see if that helps.

If that doesn't fix it, I'm not sure what would.

OldiesButGoodies:
Thanks, I tried that, moving it after the other images, but no go.

So then I rethunk what I tried a couple days ago and edited that HOLD check from this:

%?C<<%?mh<%C%Vda|%Vdb>>

to just this:

%?mh<%C%Vda|%Vdb>

(or should that be %?mh<%Cl.... for cover-art load?)


It switches between two screens when hold is ON, but .... there's no cover-art displayed. Just the Progress bar and VU meter near the bottom. Maybe if I make that cover-art viewport smaller, like it used to be, only 40x40 in size. Sure would be nice to cover up all the other stuff and display just larger cover-art though.

Or what if I put that "a" viewport after all the others? Trial and error, days of trial and error....

Navigation

[0] Message Index

[#] Next page

Go to full version