From 3aa242ceb4a855c6800ba2f10d486827549d3ada Mon Sep 17 00:00:00 2001 From: kremsy Date: Wed, 19 Feb 2014 22:24:56 +0100 Subject: [PATCH] temp improvement --- application/core/Maps/MapList.php | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/application/core/Maps/MapList.php b/application/core/Maps/MapList.php index bae8f1f4..e9d36873 100644 --- a/application/core/Maps/MapList.php +++ b/application/core/Maps/MapList.php @@ -322,22 +322,8 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener { $script->addTooltip($eraseLabel, $descriptionLabel, array(Script::OPTION_TOOLTIP_TEXT => 'Remove Map: $<' . $map->name . '$>')); } - //Switch Map Voting - if ($this->maniaControl->pluginManager->isPluginActive(self::DEFAULT_CUSTOM_VOTE_PLUGIN)) { - $switchLabel = new Label_Button(); - $mapFrame->add($switchLabel); - $switchLabel->setX($width / 2 - 10); - $switchLabel->setZ(0.2); - $switchLabel->setSize(3, 3); - $switchLabel->setTextSize(2); - $switchLabel->setText('»'); - $switchLabel->setTextColor('0f0'); - - $switchLabel->setAction(self::ACTION_START_SWITCH_VOTE . '.' . ($id - 1)); - - $script->addTooltip($switchLabel, $descriptionLabel, array(Script::OPTION_TOOLTIP_TEXT => 'Start Map-Switch vote: $<' . $map->name . '$>')); - } else if ($this->maniaControl->authenticationManager->checkPermission($player, MapManager::SETTING_PERMISSION_ADD_MAP)) { + if ($this->maniaControl->authenticationManager->checkPermission($player, MapManager::SETTING_PERMISSION_ADD_MAP)) { // Switch to map $switchLabel = new Label_Button(); $mapFrame->add($switchLabel); @@ -352,6 +338,20 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener { $script->addToggle($switchLabel, $confirmFrame); $script->addTooltip($switchLabel, $descriptionLabel, array(Script::OPTION_TOOLTIP_TEXT => 'Switch Directly to Map: $<' . $map->name . '$>')); + } else if ($this->maniaControl->pluginManager->isPluginActive(self::DEFAULT_CUSTOM_VOTE_PLUGIN)) { + //Switch Map Voting + $switchLabel = new Label_Button(); + $mapFrame->add($switchLabel); + $switchLabel->setX($width / 2 - 10); + $switchLabel->setZ(0.2); + $switchLabel->setSize(3, 3); + $switchLabel->setTextSize(2); + $switchLabel->setText('»'); + $switchLabel->setTextColor('0f0'); + + $switchLabel->setAction(self::ACTION_START_SWITCH_VOTE . '.' . ($id - 1)); + + $script->addTooltip($switchLabel, $descriptionLabel, array(Script::OPTION_TOOLTIP_TEXT => 'Start Map-Switch vote: $<' . $map->name . '$>')); } // Display Karma bar