|
Rockbox mail archiveSubject: Re: Regarding the new %xd feature in r27717Re: Regarding the new %xd feature in r27717
From: Jonathan Gordon <jdgordy_at_gmail.com>
Date: Thu, 12 Aug 2010 08:54:26 +1000 On 12 August 2010 05:23, Magnus Holmgren <magnushol_at_gmail.com> wrote: > Hi, > > Regarding the new %xd feature in r27717 (specifying an "enum" tag as second > argument). I tried using it, and noticed a few things: > > * Shouldn't clear_image_pos() always be called, so that behavior > is the same as within a conditional? If not, you can't really > use it with images with transparency... That can be added. > > * Rather than passing TOKEN_VALUE_ONLY to get_token_value for > the sub-token, wouldn't it be better to pass > img->num_subimages, so that it can be used for things like > battery level as well? > > However, for battery level to work properly, another change is > needed; the intval need to be calculated like this: > > *(limit - 2) * l / 100 + 2; > > Otherwise nothing is displayed for the full level (100%) (and > when using a conditional, the last image is displayed for the > two highest intvals). I'm pretty sure it used to work like > this once... Those tags which scale their value needs some work. That is what the TOKEN_VALUE_ONLY value is for. The point for that value is so those scaled tags dont do any scaling at all, so battery level (when limit == TOKEN_VALUE_ONLY) would always be between 0 and 100. If you do want to use scaling there then the optional 3rd param overrides that. (so %xd(a, %bl) and %xd(a, %bl, 10) would give slightly different behaviours. (NOTE> this isnt being done yet though but is on my todo list). > > Any opinions? > > Unrelated: when trying this out I tried using --debug-wps on the simulator > to see why a WPS failed to load. All that produced where printouts about the > loaded filenames. It is supposed to do more, isn't it? well, yes and no. the debug output hasnt been fixed up since moving to the new parser. It needs some work stilll Received on 2010-08-12 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |