force to play button on non team modes

This commit is contained in:
kremsy 2014-02-01 19:43:44 +01:00 committed by Steffen Schröder
parent 600a181974
commit 0db776a2e5

View File

@ -304,13 +304,16 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
$script->addTooltip($blueQuad, $descriptionLabel, array(Script::OPTION_TOOLTIP_TEXT => "Force " . $listPlayer->nickname . '$z to Blue Team!')); $script->addTooltip($blueQuad, $descriptionLabel, array(Script::OPTION_TOOLTIP_TEXT => "Force " . $listPlayer->nickname . '$z to Blue Team!'));
} else { } else {
// Force to Play // Force to Play
$redQuad = new Quad_Emblems(); $playQuad = new Quad_Emblems();
$playerFrame->add($redQuad); $playerFrame->add($playQuad);
$redQuad->setX($x + 145); $playQuad->setX($x + 143);
$redQuad->setZ(0.1); $playQuad->setZ(0.1);
$redQuad->setSubStyle($redQuad::SUBSTYLE_2); $playQuad->setSubStyle($playQuad::SUBSTYLE_2);
$redQuad->setSize(3.8, 3.8); $playQuad->setSize(3.8, 3.8);
$redQuad->setAction(self::ACTION_FORCE_PLAY . "." . $listPlayer->login); $playQuad->setAction(self::ACTION_FORCE_PLAY . "." . $listPlayer->login);
// Force to Blue-Team Description Label
$script->addTooltip($playQuad, $descriptionLabel, array(Script::OPTION_TOOLTIP_TEXT => "Force " . $listPlayer->nickname . '$z to Play!'));
} }
// Force to Spectator Quad // Force to Spectator Quad
@ -628,6 +631,9 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
case self::ACTION_FORCE_SPEC: case self::ACTION_FORCE_SPEC:
$this->maniaControl->playerManager->playerActions->forcePlayerToSpectator($adminLogin, $targetLogin, PlayerActions::SPECTATOR_BUT_KEEP_SELECTABLE); $this->maniaControl->playerManager->playerActions->forcePlayerToSpectator($adminLogin, $targetLogin, PlayerActions::SPECTATOR_BUT_KEEP_SELECTABLE);
break; break;
case self::ACTION_FORCE_PLAY:
$this->maniaControl->playerManager->playerActions->forcePlayerToPlay($adminLogin, $targetLogin);
break;
case self::ACTION_MUTE_PLAYER: case self::ACTION_MUTE_PLAYER:
$this->maniaControl->playerManager->playerActions->mutePlayer($adminLogin, $targetLogin); $this->maniaControl->playerManager->playerActions->mutePlayer($adminLogin, $targetLogin);
$this->showPlayerList($this->maniaControl->playerManager->getPlayer($adminLogin)); $this->showPlayerList($this->maniaControl->playerManager->getPlayer($adminLogin));