fixed error

This commit is contained in:
Steffen Schröder 2014-05-16 20:31:50 +02:00
parent d664675230
commit 3423bef7a3

View File

@ -216,6 +216,7 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
$pageNumber = 1 + $chunkIndex * self::MAX_PAGES_PER_CHUNK; $pageNumber = 1 + $chunkIndex * self::MAX_PAGES_PER_CHUNK;
$paging->setStartPageNumber($pageIndex + 1); $paging->setStartPageNumber($pageIndex + 1);
$index = 0;
$id = 1 + $mapsBeginIndex; $id = 1 + $mapsBeginIndex;
$y = $height / 2 - 10; $y = $height / 2 - 10;
$pageFrame = null; $pageFrame = null;
@ -228,7 +229,7 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
$mxIconGreenHover = $this->maniaControl->manialinkManager->iconManager->getIcon(IconManager::MX_ICON_GREEN_MOVER); $mxIconGreenHover = $this->maniaControl->manialinkManager->iconManager->getIcon(IconManager::MX_ICON_GREEN_MOVER);
foreach ($mapList as $map) { foreach ($mapList as $map) {
if ($id % self::MAX_MAPS_PER_PAGE === 0) { if ($index % self::MAX_MAPS_PER_PAGE === 0) {
$pageFrame = new Frame(); $pageFrame = new Frame();
$frame->add($pageFrame); $frame->add($pageFrame);
$y = $height / 2 - 10; $y = $height / 2 - 10;
@ -463,6 +464,7 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
$y -= 4; $y -= 4;
$id++; $id++;
$index++;
} }
$this->maniaControl->manialinkManager->displayWidget($maniaLink, $player, 'MapList'); $this->maniaControl->manialinkManager->displayWidget($maniaLink, $player, 'MapList');