tests
This commit is contained in:
parent
18a4833aa3
commit
b5299b8afd
@ -701,17 +701,23 @@ function setHP($hp, $maxhp)
|
|||||||
return $rr;
|
return $rr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $hp
|
||||||
|
* @param $maxhp
|
||||||
|
*/
|
||||||
function setHP2($hp, $maxhp)
|
function setHP2($hp, $maxhp)
|
||||||
{
|
{
|
||||||
$bar = round($hp/$maxhp*100);
|
$bar = round($hp/$maxhp*100);
|
||||||
?>
|
$output = <<<HTML
|
||||||
<div style="width: 100%; height: 10px; background: #800; overflow: hidden;">
|
<div style="width: 75%; height: 16px; background: silver; overflow: hidden; border-radius: 3px;">
|
||||||
<div style="height: 10px; background: #f00; border-radius: 3px; width: <?= $bar ?>%;"></div>
|
<div style="height: 16px; background: limegreen; border-radius: 3px; width: $bar%;"></div>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 100%; height: 10px; font-size: 9px; text-align: center; margin-top: -10px;">
|
<div style="width: 100%; height: 16px; font-size: 14px; text-align: center; margin-top: -16px;">
|
||||||
<?= $hp ?> / <?= $maxhp ?>
|
$hp / $maxhp
|
||||||
</div>
|
</div>
|
||||||
<?php
|
HTML;
|
||||||
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
function echoscroll($slot)
|
function echoscroll($slot)
|
||||||
|
Loading…
Reference in New Issue
Block a user