host mx icon on maniacontrol homepage

This commit is contained in:
Steffen Schröder 2013-12-31 16:19:39 +01:00
parent ec018f97f5
commit 05f487aafa

View File

@ -65,6 +65,7 @@ class WidgetPlugin implements CallbackListener, Plugin {
* Private Properties
*/
/**
*
* @var maniaControl $maniaControl
*/
private $maniaControl = null;
@ -243,8 +244,7 @@ class WidgetPlugin implements CallbackListener, Plugin {
if (isset($map->mx->pageurl)) {
$quad = new Quad();
$frame->add($quad);
$quad->setImage("http://wiki.maniaplanet.com/pool/images/b/bf/ManiaExchange_logo.png"); // TODO include image into
// maniacontrol
$quad->setImage("http://images.maniacontrol.com/icons/ManiaExchange.png");
$quad->setPosition(-$width / 2 + 4, -1.5, -0.5);
$quad->setSize(4, 4);
$quad->setHAlign(Control::CENTER);
@ -339,17 +339,18 @@ class WidgetPlugin implements CallbackListener, Plugin {
$playerCount = 0;
$spectatorCount = 0;
/**
*
* @var Player $player
*/
foreach ($players as $player) {
if ($player->isSpectator) {
$spectatorCount++;
} else {
}
else {
$playerCount++;
}
}
$label = new Label_Text();
$frame->add($label);
$label->setPosition(0, 1.5, 0.2);
@ -476,6 +477,7 @@ class WidgetPlugin implements CallbackListener, Plugin {
$queuedMap = $this->maniaControl->mapManager->mapQueue->getNextMap();
/**
*
* @var Player $requester
*/
$requester = null;
@ -485,7 +487,8 @@ class WidgetPlugin implements CallbackListener, Plugin {
$map = $this->maniaControl->client->getResponse();
$name = $map['Name'];
$author = $map['Author'];
} else {
}
else {
$requester = $queuedMap[0];
$map = $queuedMap[1];
$name = $map->name;