Page 1 of 1

PBar plugin

Posted: February 16th, 2007, 12:09 pm
by elesquiador
PBar plugin


This plugin was originally intended to create a winamp position bar that updated pixel by pixel using custom characters rather than 1 character at a time. It is useful for any horizontal progress bar, however. It has three functions (3 different looks).

Function 1 looks much like the built in progress bar, but it uses a custom character instead of the + sign to allow for more frequent updates and more continuous movement. It requires only 1 custom character. This allows you to leave your other 7 custom characters available for other purposes. Parameter 1 of the function is the length of the bar to create and the custom character number to use, delimited by the # character without any spaces. Both are required parameters. Parameter two is the current time and the total time, again delimited by the # symbol. For example, for a 10 character long winamp bar that uses custom character 3, you could use the following:

$dll(Pbar,1,10#3,$Winamppos#$WinampLength)


Function 2 fills in the bar as it continues across the screen. It is framed well by square bracket characters. It uses 2 custom characters (a full block and a dynamic character that represents the current position). They are always # 7 and 8. The first parameter is the length of the bar, while the second is the total length. For the winamp example above:

$dll(Pbar,2,10,$Winamppos#$WinampLength)

Function 3 creates a gapless horizontal bar for CF displays. The bar itself uses 3 custom characters (6,7, and 8) and has the exact same syntax as function 2. It is framed well by the custom characters

$CustomChar(1,1,1,1,1,1,1,1,1)$Chr(176)

On the left and

$CustomChar(2,32,32,32,32,32,32,32,32)$Chr(158)

On the right.

For example, to create a 10 character framed gapless winamp position bar, use:
$CustomChar(1,1,1,1,1,1,1,1,1)$Chr(176)$dll(PBar,3,10,$Winamppos#$WinampLength)$CustomChar(2,32,32,32,32,32,32,32,32)$Chr(158).


Along with the mem plugin and getnum plugin, this was also used to create my nero status bar as follows:
$CustomChar(1,1,1,1,1,1,1,1,1)$Chr(176)$dll(PBar,3,18,$dll(getnum,1,$dll(mem,1,0,0),)#100)$CustomChar(2,32,32,32,32,32,32,32,32)$Chr(158)




I hope this is useful!

Using more than one?

Posted: July 6th, 2007, 3:31 pm
by santa8claws
Would it be possible to use more than one PBar by using different custom chars? Either an extra argument or perhaps another function? This would be most appreciated!
Thanks!
-- S8C

Re: PBar plugin

Posted: November 25th, 2007, 11:16 pm
by coiote
elesquiador wrote:...

$dll(Pbar,1,10#3,$Winamppos#$WinampLength)

...!
Where is the Pbar.dll ?

thanks !


EDIT: after login, It was shown :oops:

Posted: March 5th, 2008, 8:08 pm
by MaZZly
hi, is it possible to specify what custom character the function3 should use, couse im trying to put 4 bars in one screen, but the custom char that show the last thing is same on all bars :S

Code: Select all

C:$CustomChar(1,1,1,1,1,1,1,1,1)$Chr(176)$dll(PBar,3,6,$HDU%(C)#100)$CustomChar(2,16,16,16,16,16,16,16,16)$Chr(158)D:$CustomChar(1,1,1,1,1,1,1,1,1)$Chr(176)$dll(PBar,3,6,$HDU%(D)#100)$CustomChar(2,16,16,16,16,16,16,16,16)$Chr(158)
G:$CustomChar(1,1,1,1,1,1,1,1,1)$Chr(176)$dll(PBar,3,6,$HDU%(G)#100)$CustomChar(2,16,16,16,16,16,16,16,16)$Chr(158)H:$CustomChar(1,1,1,1,1,1,1,1,1)$Chr(176)$dll(PBar,3,6,$HDU%(H)#100)$CustomChar(2,16,16,16,16,16,16,16,16)$Chr(158)

Posted: May 4th, 2008, 12:22 am
by elesquiador
As written, no it is not possible to specify which custom characters function 3 uses. It wouldn't be a hard change to make, though. Maybe I'll get to it soon.