From f46d50fee01fc7c416a04406fb824f7523c9ea6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schro=CC=88der?= Date: Mon, 6 Jan 2014 14:43:26 +0100 Subject: [PATCH] resolved todo --- application/core/Maps/MapList.php | 28 ++++++++++++++-------------- application/core/Maps/MapManager.php | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/application/core/Maps/MapList.php b/application/core/Maps/MapList.php index 17fa959a..e67c2b29 100644 --- a/application/core/Maps/MapList.php +++ b/application/core/Maps/MapList.php @@ -297,8 +297,6 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener { $preDefinedDescriptionLabel->setTextSize(2); $preDefinedDescriptionLabel->setVisible(false); - //TODO add pages - $queuedMaps = $this->maniaControl->mapManager->mapQueue->getQueuedMapsRanking(); /** @var KarmaPlugin $karmaPlugin */ $karmaPlugin = $this->maniaControl->pluginManager->getPlugin(self::DEFAULT_KARMA_PLUGIN); @@ -386,27 +384,29 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener { $script->addTooltip($buttLabel, $descriptionLabel); } - if($this->maniaControl->authenticationManager->checkRight($player, AuthenticationManager::AUTH_LEVEL_ADMIN)) { //TODO SET as setting who can add maps + if($this->maniaControl->authenticationManager->checkRight($player, AuthenticationManager::AUTH_LEVEL_ADMIN)) { + //TODO SET as setting who can add maps //erase map quad - $eraseQuad = new Label_Button(); //TODO change name to label - $mapFrame->add($eraseQuad); - $eraseQuad->setX($this->width / 2 - 5); - $eraseQuad->setZ(0.2); - $eraseQuad->setSize(3, 3); - $eraseQuad->setTextSize(1); - $eraseQuad->setText("x"); - $eraseQuad->setTextColor("A00"); + $eraseLabel = new Label_Button(); + $mapFrame->add($eraseLabel); + $eraseLabel->setX($this->width / 2 - 5); + $eraseLabel->setZ(0.2); + $eraseLabel->setSize(3, 3); + $eraseLabel->setTextSize(1); + $eraseLabel->setText("x"); + $eraseLabel->setTextColor("A00"); $confirmFrame = $this->buildConfirmFrame($maniaLink, $y, $id, $map->uid); - $script->addToggle($eraseQuad, $confirmFrame); + $script->addToggle($eraseLabel, $confirmFrame); //Description Label $descriptionLabel = clone $preDefinedDescriptionLabel; $frame->add($descriptionLabel); $descriptionLabel->setText("Remove Map: {$map->name}"); - $script->addTooltip($eraseQuad, $descriptionLabel); + $script->addTooltip($eraseLabel, $descriptionLabel); } - if($this->maniaControl->authenticationManager->checkRight($player, AuthenticationManager::AUTH_LEVEL_MODERATOR)) { //TODO SET as setting who can add maps + if($this->maniaControl->authenticationManager->checkRight($player, AuthenticationManager::AUTH_LEVEL_MODERATOR)) { + //TODO SET as setting who can add maps //switch to map quad $switchToQuad = new Label_Button(); $mapFrame->add($switchToQuad); diff --git a/application/core/Maps/MapManager.php b/application/core/Maps/MapManager.php index 307872a5..9392f6d9 100644 --- a/application/core/Maps/MapManager.php +++ b/application/core/Maps/MapManager.php @@ -125,7 +125,7 @@ class MapManager implements CallbackListener { /** * Add a map to the MapList * - * @param \ManiaControl\Maps\Map $map + * @param Map $map * @return bool */ private function addMap(Map $map) { // TODO needed?