Support and General Use > Theming and Appearance Customization
vertical progressbar
Arzhur:
I read again and again the CustomWPS page and I still don't understand how it must be written...
I want to have a vertical volume bar located in this area:
%V(90,90,4,90,0)
starting from the bottom and growing up using this bmp:
%pb(0,0,90,4,volumebar.bmp,vertical)
but no way to make it work, all I have is a failsafe wps...
My bmp is of course a 90 px heignt and 4 px width picture, is it correct?
Thanks for your advices.
[Saint]:
If I read the documentation, it seems to suggest that:
--- Code: ---%V(90,90,4,90,0)
%xl(A,volumebar.bmp,0,0)
%pb(0,0,90,4,volumebar.bmp,vertical,image,A)
--- End code ---
Should work...but I see no point in the "image" option at all...if you can specify a filename to load as the bar image, then I cannot for the life of my understand why the "image" param is needed at all.
I don't have the time to test this presently, it would be interesting to see the answer for:
a: Why doesn't your initial code "just work", and
b: why give the option to specify a filename *and* an optional image param that loads an identifier for an image.
Assuming the syntax in your original code snippet is valid, which one wins? the filename.bmp, or the "image,<identifier" params?
[St.]
Arzhur:
Not exactly what you wrote, finally after trying again and again this works :
#### Volume Bar
%V(90,38,4,-,0)
%pv(0,0,4,90,volumebar.bmp,vertical)
I just missed the pv instruction...
[Saint]:
Whoops...kinda ashamed I didn't pick up on that myself.
I could clearly see from your comments that you wanted a *volume* bar, oh well...sigh.
I also should have noticed the out-of-bounds image.
Regardless, this has me wondering about a few things now. In particular the reason for the "image" parameter. It seems to me that this param is totally needless (if the syntax in CustonWPS is to be believed).
For a scenario, it would seem to me that:
--- Code: ---%V(0,0,100,100,-)
%xl(foo,0,0,another_image.bmp)
%pv(0,0,100,100,image.bmp,vertical,image,foo)
--- End code ---
Is perfectly valid...but, in this case (I don't even know if this parses, I can't check right now) what image is used, "image.bmp" or "another_image.bmp"?
The same scenario could be used but with "-" in place of "image.bmp"...what would be drawn, the default bar or "another_image.bmp"?
[St.]
JdGordon:
--- Quote from: [St.] on June 12, 2011, 11:06:12 AM ---Regardless, this has me wondering about a few things now. In particular the reason for the "image" parameter. It seems to me that this param is totally needless (if the syntax in CustonWPS is to be believed).
[St.]
--- End quote ---
CustomWPS is a bit outdate apparently and badly worded. The first non-number param will be used as the filename if it doesnt match any of the options, it can be missing completly though. (..., filename.bmp, some, option, list) is IMO harder to understand than (..., image, image_id, some, option, list) if you bare in mind that option list can be provided in any order.
If no image id or filename is given the inbuilt one will be used.
If the 'image' option is used it will override image.bmp (even if - is used there)
Think of the filename as keeping backwards compatability. I'm going to fix CustomWPS to reflect this.,
Navigation
[0] Message Index
[#] Next page
Go to full version