Support and General Use > Theming and Appearance Customization
Album Art as Backdrop
(1/1)
RockBoxFan:
Is it possible to use the %VB tag to display album art as a backdrop?
I am attempting this one a 1g Nano. Here is a code fragment:
%V(0,0,-,-,-)%VB
%V(0,0,-,-,-)
%Fl(4,21-Adobe-Helvetica.fnt,50)
%Vd(A)%VB
%Vd(t)
%Vl(A,22,0,132,132,1)
%Cl(0,0,132,132,c,c)
%Cd%VB
%Vl(t,40,42,65,20,4)%Vf(000000)
%al%pc
(I am trying to write black text over the album art.)
This seems to work in the simulator, but the results are inconsistent, meaning I have to re-load the theme each time I start the simulator. Is this concept supported, and am I doing it correctly?
Thanks!
ploco:
Don't forget to force update the top layer after draw in backdrop.
%V(0,0,-,-,-)
%Fl(4,21-Adobe-Helvetica.fnt,50)
%Vd(A)%Vd(t)
%Vl(A,22,0,132,132,1)%VB
%Cl(0,0,132,132,c,c)
%Cd
#force update View A
%Vl(A,22,0,132,132,1)
%Vl(t,40,42,65,20,4)%Vf(000000)
%al%pc
RockBoxFan:
Wow, that does seem to stabilize things (much more consistent, so I don't have to keep reloading the theme).
Thanks!
Can you explain why I need this extra line and what it does, or perhaps point me to some documentation? I have been trying to work it out from the wiki:
http://www.rockbox.org/wiki/CustomWPS#Viewport_Draw_Layer
which says "Any viewports you want drawn on the backdrop need the %VB tag but otherwise code as normal."
Why do I need to force an update to the top layer (and how does your extra command force that?).
ploco:
%VB only associate with viewports, such as %V or %Vl( not %Vd)
So whenever you want to drawn on backdrop, only need to append a %VB to the end of the %V line
however there isn't any documents record the needs of top layer overlay except from the demo script
%V(0,0,-,-,-)%VB
%V(0,0,-,-,-)
indicates "I drawn, then I menially refresh the screen by putting a same size viewport right on top of it "
My guess is that top layer viewport always receive a screen refreshment after drawn but button layer does not get the same treatment.
I think this extra top layer is a plus
for example
%V(A,22,0,132,132,1)%VB
%Cl(0,0,132,132,c,c)
%Cd
#use a bmp with alpha channel can make really fancy photo frame.
%V(A,22,0,132,132,1)
%x(frame,frame.bmp,0,0)
RockBoxFan:
That makes sense. Thank you so much for your help!
Navigation
[0] Message Index
Go to full version