Our new official repo is on github
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases

PBar plugin

Announcements of new plugins or updates.

Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo

Post Reply
elesquiador
Plugin Author
Posts: 18
Joined: February 9th, 2007, 10:47 pm

PBar plugin

Post 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!
You do not have the required permissions to view the files attached to this post.
santa8claws
Posts: 5
Joined: October 20th, 2006, 9:01 pm

Using more than one?

Post 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
coiote
Posts: 10
Joined: November 25th, 2007, 11:13 pm
Location: Brazil-SC
Contact:

Re: PBar plugin

Post by coiote »

elesquiador wrote:...

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

...!
Where is the Pbar.dll ?

thanks !


EDIT: after login, It was shown :oops:
MaZZly
Posts: 1
Joined: March 4th, 2008, 8:49 am

Post 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)
elesquiador
Plugin Author
Posts: 18
Joined: February 9th, 2007, 10:47 pm

Post 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.
Post Reply