small fixes

This commit is contained in:
kremsy 2014-01-10 15:58:27 +01:00
parent fd5d2e59e9
commit 894ff70c54
4 changed files with 10 additions and 6 deletions

View File

@ -687,8 +687,8 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
$this->maniaControl->mapManager->addMapFromMx($mapId, $player->login); $this->maniaControl->mapManager->addMapFromMx($mapId, $player->login);
break; break;
case self::ACTION_ERASE_MAP: case self::ACTION_ERASE_MAP:
//actionArray[3] = mapUid $mapUid = $actionArray[3];
$this->maniaControl->mapManager->removeMap($player, $actionArray[3]); $this->maniaControl->mapManager->removeMap($player, $mapUid);
$this->showMapList($player); $this->showMapList($player);
break; break;
case self::ACTION_SWITCH_MAP: case self::ACTION_SWITCH_MAP:

View File

@ -292,6 +292,7 @@ class PlayerActions {
$label->setStyle(Label_Text::STYLE_TextCardMedium); $label->setStyle(Label_Text::STYLE_TextCardMedium);
$label->setText($line); $label->setText($line);
$label->setTextColor('ff0'); $label->setTextColor('ff0');
$label->setTextSize(1.3);
$y -= 4; $y -= 4;
} }

View File

@ -201,7 +201,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener {
$countryQuad->setImage("file://Skins/Avatars/Flags/{$countryCode}.dds"); $countryQuad->setImage("file://Skins/Avatars/Flags/{$countryCode}.dds");
$countryQuad->setX($x + 98); $countryQuad->setX($x + 98);
$countryQuad->setSize(4, 4); $countryQuad->setSize(4, 4);
$countryQuad->setZ(-0.1); $countryQuad->setZ(1);
$script->addTooltip($countryQuad, $descriptionLabel, array(Script::OPTION_TOOLTIP_TEXT => $listPlayer->nickname . " from " . $listPlayer->path)); $script->addTooltip($countryQuad, $descriptionLabel, array(Script::OPTION_TOOLTIP_TEXT => $listPlayer->nickname . " from " . $listPlayer->path));
} }
@ -240,7 +240,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener {
$playerQuad->setSubStyle($playerQuad::SUBSTYLE_Camera); $playerQuad->setSubStyle($playerQuad::SUBSTYLE_Camera);
$playerQuad->setSize(3.8, 3.8); $playerQuad->setSize(3.8, 3.8);
$script->addTooltip($playerQuad, $descriptionLabel, array(Script::OPTION_TOOLTIP_TEXT => "Spectate " . $listPlayer->nickname)); $script->addTooltip($playerQuad, $descriptionLabel, array(Script::OPTION_TOOLTIP_TEXT => "Spectate " . $listPlayer->nickname));
$playerQuad->setAction(self::ACTION_SPECTATE_PLAYER); $playerQuad->setAction(self::ACTION_SPECTATE_PLAYER . "." . $listPlayer->login);
// Player Profile Quad // Player Profile Quad
$playerQuad = new Quad_UIConstruction_Buttons(); $playerQuad = new Quad_UIConstruction_Buttons();
@ -444,7 +444,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener {
$quad = clone $quad; $quad = clone $quad;
$frame->add($quad); $frame->add($quad);
$quad->setY($y); $quad->setY($y);
$quad->setAction(self::ACTION_KICK_PLAYER . "." . $login); $quad->setAction(self::ACTION_WARN_PLAYER . "." . $login);
$label = clone $label; $label = clone $label;
$frame->add($label); $frame->add($label);
@ -577,8 +577,11 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener {
switch($action) { switch($action) {
case self::ACTION_SPECTATE_PLAYER: // TODO not working yet case self::ACTION_SPECTATE_PLAYER: // TODO not working yet
var_dump($adminLogin);
$this->maniaControl->client->query('ForceSpectator', $adminLogin, PlayerActions::SPECTATOR_SPECTATOR); $this->maniaControl->client->query('ForceSpectator', $adminLogin, PlayerActions::SPECTATOR_SPECTATOR);
var_dump($this->maniaControl->client->getResponse());
$this->maniaControl->client->query('ForceSpectatorTarget', $adminLogin, $targetLogin, 1); $this->maniaControl->client->query('ForceSpectatorTarget', $adminLogin, $targetLogin, 1);
var_dump($this->maniaControl->client->getResponse());
break; break;
case self::ACTION_OPEN_PLAYER_DETAILED: case self::ACTION_OPEN_PLAYER_DETAILED:
$player = $this->maniaControl->playerManager->getPlayer($adminLogin); $player = $this->maniaControl->playerManager->getPlayer($adminLogin);

View File

@ -63,7 +63,7 @@ class ServerCommands implements CallbackListener, CommandListener, ManialinkPage
$itemQuad = new Quad_Icons128x32_1(); //TODO check if mode supports it $itemQuad = new Quad_Icons128x32_1(); //TODO check if mode supports it
$itemQuad->setSubStyle($itemQuad::SUBSTYLE_ManiaLinkSwitch); $itemQuad->setSubStyle($itemQuad::SUBSTYLE_ManiaLinkSwitch);
$itemQuad->setAction(self::ACTION_SET_PAUSE); $itemQuad->setAction(self::ACTION_SET_PAUSE);
$this->maniaControl->actionsMenu->addAdminMenuItem($itemQuad, 1, 'Pauses the current game.'); $this->maniaControl->actionsMenu->addAdminMenuItem($itemQuad, 1, 'Pauses the current game');
// Action cancel Vote // Action cancel Vote
$this->maniaControl->manialinkManager->registerManialinkPageAnswerListener(self::ACTION_CANCEL_VOTE, $this, 'command_cancelVote'); $this->maniaControl->manialinkManager->registerManialinkPageAnswerListener(self::ACTION_CANCEL_VOTE, $this, 'command_cancelVote');