Support and General Use > Theming and Appearance Customization
Image based progress and volume bars
(1/1)
Carson Dyle:
Is it possible to implement image based progress and volume bars with both the foreground and background images in bitmaps? The only way that I've seen these implemented is with the background image in the backdrop.
What I'm doing is using conditional viewports to have the progress and volume bars share the same screen area. Normally progress is displayed, but when volume is adjusted the volume bar appears. I can easily do this with non-bitmap bars. But since I want the progress bar and volume bars to have different lengths and different appearances, I can't overlay them on a single background in the backdrop.
Progweed:
You can achieve this by putting the progress bar and its background into the same viewport; and I think both bitmaps need to be partially transparent. You might want to have a look at my theme KISSv2:
http://themes.rockbox.org/index.php?themeid=1119&target=sansafuzev2
--- Code: ---%Vl(a,126,116,90,8,-)
%x(a,kissv2_pb_small_bg.bmp,0,0) // Background
%pb(0,0,90,8,kissv2_pb_small.bmp) // Progress bar
--- End code ---
DrewVosburg:
NICE!! that's a sweet technique!
[Saint]:
There's no need for transparency here...
The only relevant thing is the position in which the images are loaded.
--- Code: ---%V(X,X,X,X,-)
%x(X,<FILE_NAME>.bmp,X,X) <--- Background
%pb(X,X,X,X,<FILE_NAME>.bmp) <--- Progress bar
--- End code ---
will work, but:
--- Code: ---%V(X,X,X,X,-)
%pb(X,X,X,X,<FILE_NAME>.bmp) <--- Progress bar
%x(X,<FILE_NAME>.bmp,X,X) <--- Background
--- End code ---
Will not.
This is because the draw order is respected, and we want the progressbar to be drawn over top of it's background.
[St.]
Navigation
[0] Message Index
Go to full version