Bugfix, CustomVotesPlugin Widget

This commit is contained in:
Jocy 2017-05-22 18:12:15 +02:00
parent 13cc7e544d
commit 8055468f20

View File

@ -702,12 +702,13 @@ class CustomVotesPlugin implements SidebarMenuEntryListener, CommandListener, Ca
$label->setTextColor('F80');
$label->setText('$sStarted by ' . $this->currentVote->voter->nickname);
//Time Gauge
$timeGauge = new Gauge();
$frame->addChild($timeGauge);
$timeGauge->setY(1.5);
$timeGauge->setSize($width * 0.95, 6);
$timeGauge->setDrawBlockBackground(false);
$timeGauge->setDrawBackground(false);
if (!$timeUntilExpire) {
$timeUntilExpire = 1;
}
@ -730,7 +731,7 @@ class CustomVotesPlugin implements SidebarMenuEntryListener, CommandListener, Ca
$frame->addChild($voteGauge);
$voteGauge->setY(-4);
$voteGauge->setSize($width * 0.65, 12);
$voteGauge->setDrawBlockBackground(false);
$voteGauge->setDrawBackground(false);
$voteGauge->setRatio($votePercentage + 0.10 - $votePercentage * 0.10);
$gaugeColor = ColorUtil::floatToStatusColor($votePercentage);
$voteGauge->setColor($gaugeColor . '6');