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