resolved todo

This commit is contained in:
Steffen Schröder 2014-01-06 14:43:26 +01:00
parent 16ec80e8d8
commit f46d50fee0
2 changed files with 15 additions and 15 deletions

View File

@ -297,8 +297,6 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
$preDefinedDescriptionLabel->setTextSize(2); $preDefinedDescriptionLabel->setTextSize(2);
$preDefinedDescriptionLabel->setVisible(false); $preDefinedDescriptionLabel->setVisible(false);
//TODO add pages
$queuedMaps = $this->maniaControl->mapManager->mapQueue->getQueuedMapsRanking(); $queuedMaps = $this->maniaControl->mapManager->mapQueue->getQueuedMapsRanking();
/** @var KarmaPlugin $karmaPlugin */ /** @var KarmaPlugin $karmaPlugin */
$karmaPlugin = $this->maniaControl->pluginManager->getPlugin(self::DEFAULT_KARMA_PLUGIN); $karmaPlugin = $this->maniaControl->pluginManager->getPlugin(self::DEFAULT_KARMA_PLUGIN);
@ -386,27 +384,29 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
$script->addTooltip($buttLabel, $descriptionLabel); $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 //erase map quad
$eraseQuad = new Label_Button(); //TODO change name to label $eraseLabel = new Label_Button();
$mapFrame->add($eraseQuad); $mapFrame->add($eraseLabel);
$eraseQuad->setX($this->width / 2 - 5); $eraseLabel->setX($this->width / 2 - 5);
$eraseQuad->setZ(0.2); $eraseLabel->setZ(0.2);
$eraseQuad->setSize(3, 3); $eraseLabel->setSize(3, 3);
$eraseQuad->setTextSize(1); $eraseLabel->setTextSize(1);
$eraseQuad->setText("x"); $eraseLabel->setText("x");
$eraseQuad->setTextColor("A00"); $eraseLabel->setTextColor("A00");
$confirmFrame = $this->buildConfirmFrame($maniaLink, $y, $id, $map->uid); $confirmFrame = $this->buildConfirmFrame($maniaLink, $y, $id, $map->uid);
$script->addToggle($eraseQuad, $confirmFrame); $script->addToggle($eraseLabel, $confirmFrame);
//Description Label //Description Label
$descriptionLabel = clone $preDefinedDescriptionLabel; $descriptionLabel = clone $preDefinedDescriptionLabel;
$frame->add($descriptionLabel); $frame->add($descriptionLabel);
$descriptionLabel->setText("Remove Map: {$map->name}"); $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 //switch to map quad
$switchToQuad = new Label_Button(); $switchToQuad = new Label_Button();
$mapFrame->add($switchToQuad); $mapFrame->add($switchToQuad);

View File

@ -125,7 +125,7 @@ class MapManager implements CallbackListener {
/** /**
* Add a map to the MapList * Add a map to the MapList
* *
* @param \ManiaControl\Maps\Map $map * @param Map $map
* @return bool * @return bool
*/ */
private function addMap(Map $map) { // TODO needed? private function addMap(Map $map) { // TODO needed?