Support and General Use > Theming and Appearance Customization
WPS images issue for volume indicator graphics: unequal distribution of images
Mikerman:
In creating a graphical volume indicator of the type in the default Rockbox status bar (e.g. one that "grows" as the volume is increased, or in which different images are shown over the volume range), I've found that the individual graphics are not displayed for equal ranges.
For example, if I have 11 graphics--images of the numbers 0-10--to be displayed to show the current volume level, when I use the conditional volume tag %?pv in the form %?pv where a-k call up images of the numbers 0-10, I've noted that the earlier numbers are displayed for a considerable number of volume increases, whereas the number 8 might be displayed for only a single volume increase.
Originally, I thought that this might have to do with the number of images to be displayed and the inability to equally distribute the total number of volume levels over that range. For example, for the iRiver H-1xx players, the default volume range is 85 volume levels (0 to -83, in addition to mute); 11 graphical images cannot be equally spaced over that 85 level range. But that wouldn't seem to explain why one or more of the images would only be displayed for a single volume level while others get 5 or more.
Am I misunderstanding/misusing the volume tag--is there some explanation for what's going on here? I've been assuming that the number of volume levels would be equally distributed over the number of entries put in the volume conditional, or thereabouts, but that doesn't seem to be the case. Is the fact that the total number of volume levels can't be equally distributed over the number of entries in the volume conditional throwing the code off or leading to a very different distribution? Is the solution, then, to express the use of 85 images (for the iRiver H-1xx players) in the conditional?
Thanks for helping me understand what's going on here.
Llorean:
If you do 12 images the second to last one is "0dB ONLY" and the last one is "values over 0dB"
Mikerman:
Llorean-- Â Could you BE any faster?
;)
And so, using my number images example above, if I wanted the images for 0-10 to show (0 as low/mute), I would use
%?pv
where the a image is the number 0 and the k image the number 10, and then there would be a more or less equal distribution of the volume levels for the images for number 1-9, with the 0 image getting a single volume level and the 10 image getting 2 volume levels (only if the volume level goes above 0dB, otherwise a single level)?
Llorean:
I think so. I don't do WPSes, my tastes are ridiculously simple when it comes to that. I'm not 100% sure the lowest image gets a single volume level, and I don't know if the distribution is perfectly even for the in betweens (it should be, I believe, but I've not tested, and I'm not going to make promises on something I don't know about). I just know the last two are definitely special cases that could've thrown you off.
Mikerman:
Thanks--this gives me something to experiment with; the non-equal distribution was entrely throwing me off, without knowing why it might be happening, and I didn't understand the tag explanation as to the last 2 spaces as mandatorily having being "reserved."
Any others more fluent here than me, please feel free to chime in.
Navigation
[0] Message Index
[#] Next page
Go to full version