note
OeufMayo
<p>First, big ++ to [epoptai] for this really nice CB client with tons of functionnalities. Hey! it even links to Babelfish!<br />
Though this is a realy cool piece of code, I wanted to add
a nifty progress bar (like the one in the Tk Client), so
here it is (you may want to change the colors to git your favorite theme)
</p>
<p>Line 290:</p>
<code>
my$nxtlvl = ($xpinfo->{'level'}+1); # line 290
my@levelXP = qw(0 0 20 50 100 200 500 1000 1600 2300 3000);
my $percentXP = int(( ($xpinfo->{'xp'} - $levelXP[$xpinfo->{'level'}]) / ($xpinfo->{'xp'}-$levelXP[$xpinfo->{'level'}]+$xpinfo->{'xp2nextlevel'})) * 100) ;
my @XPcolors = qw(4A2625 71131C 9A0213 BD0606 FF0000 9E3B00 1D8700 41AF00 12E800 00FF00);
my $rest = abs(100-$percentXP);
</code>
<p>Line 297</p>
<code>
<table border="0" height="100%" width="100%" cellpadding="0" cellspacing="0" align="center"> # Line 297
<tr><td><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td bgcolor="#$XPcolors[int($percentXP/10)-1]" width="$percentXP%"> </td><td width="$rest%"bgcolor="#CCCCCC"> </td></tr></table></td></tr>
</code>
<p><b>Update:</b> Added coloration according to the user's progress (gradient from red to green)</p>
<p>Cheers, [OeufMayo]</p>
<kbd>-- <br>
my $<a href="/index.pl?node=OeufMayo&lastnode_id=1072">OeufMayo</a> = new PerlMonger::Paris({http => '<a href="http://paris.mongueurs.net">paris.mongueurs.net</a>'});</kbd>
63816
63816