Support and General Use > Theming and Appearance Customization
(SOLVED) Newbie Progress Bar Transparency issues.
(1/1)
KiyoshiKatu:
Hello all, let me start by saying that I am very new to both theme creation and Rockbox. I have an iPod Photo on the way to my house that I plan on putting Rockbox onto immediately, and in the meantime, I figured I would start working on a theme of my own. I am taking it slowly but surely, simply tackling one problem at a time. I have created a backdrop for the whole theme, and I have made a progress bar to match, as well as a backdrop for the progress bar, to give it a permanent border.
The problem that I am running into is that transparency doesn't seem to be working the same for me as it does in other themes. I have rounded ends on the progress bar and its backdrop, but there is a small overlap. Where this overlap is, the progress bar's transparency kicks in, and shows the theme's backdrop instead of the image that is directly behind it.
I have looked to other themes to see how they carried it out, such as the FuzeRock+ theme, and the only difference I see is that on FuzeRock+, the backdrop image is preloaded, whereas mine loads it and displays it in the same call. This is because preloading images in my WPS causes it to crash on me, no matter what I do (probably another newbie mistake).
I have attached the two images I am using for the bar, as well as a screendump showing the problem. Hopefully someone on here can point out my mistake!
KiyoshiKatu:
Almost forgot to post the code I'm using for the progress bar!
--- Code: ---#Progress Bar and its backdrop
%V(4,81,212,9,1)
%x(B,abstract_pb_base.bmp,0,0)
%pb(1,1,210,7,abstract_pb.bmp)
--- End code ---
KiyoshiKatu:
I hopped on to the IRC channel and was able to get a solution figured out. For future reference, the problem was that I was stacking two images on top of one another, which apparently sometimes works, but not always, and is entirely up to chance.
I updated my code for the progress bar to this:
--- Code: ---%xl(pb,abstract_pb.bmp,0,0)
%xl(pbbd,abstract_pbbd.bmp,0,0)
%xl(vol,abstract_vol.bmp,0,0,13)
#
#
<SNIP>
#
#Progress Bar and its backdrop
%V(4,81,212,9,1)
#%x(B,abstract_pb_base.bmp,0,0) \\I commented out this line to show what I had done before to get the backdrop for the progress bar.
%pb(0,0,212,9,image,pb,backdrop,pbbd)
--- End code ---
The new line, directly below the commented backdrop, is what I changed the progress bar tag to. I followed the info on this page:
http://download.rockbox.org/daily/manual/rockbox-ipodvideo/rockbox-buildap4.html#x20-413000D.28
which tells me exactly how to do what I wanted. I apparently missed that in my searching, and did not see the updates to the %pb tag. Silly mistake on my part.
I at the same time updated the images to use an alpha layer instead of Magic Magenta, also recommended on the IRC channel.
Attached is the end result from the updates to the progress bar.
Navigation
[0] Message Index
Go to full version