fix queue plugin
This commit is contained in:
parent
d9af2805cd
commit
05eb8b96a7
@ -177,7 +177,7 @@ class ManialinkManager implements ManialinkPageAnswerListener, CallbackListener
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays a ManiaLink Widget to a certain Player
|
||||
* Displays a ManiaLink Widget to a certain Player (Should only be used on Main Widgets)
|
||||
*
|
||||
* @param mixed $maniaLink
|
||||
* @param Player $player
|
||||
@ -186,9 +186,9 @@ class ManialinkManager implements ManialinkPageAnswerListener, CallbackListener
|
||||
public function displayWidget($maniaLink, Player $player, $widgetName = '') {
|
||||
// render and display xml
|
||||
$this->maniaControl->manialinkManager->sendManialink($maniaLink, $player->login);
|
||||
$this->disableAltMenu($player);
|
||||
|
||||
if ($widgetName != '') {
|
||||
if ($widgetName != '') { //TODO make check by manialinkId, getter is needed to avoid uses on non main widgets
|
||||
$this->disableAltMenu($player);
|
||||
// Trigger callback
|
||||
$this->maniaControl->callbackManager->triggerCallback(self::CB_MAIN_WINDOW_OPENED, array(self::CB_MAIN_WINDOW_OPENED, $player, $widgetName));
|
||||
}
|
||||
|
@ -415,7 +415,7 @@ class QueuePlugin implements CallbackListener, CommandListener, ManialinkPageAns
|
||||
$messageLabel->setText($message);
|
||||
$messageLabel->setStyle(Label_Text::STYLE_TextStaticSmall);
|
||||
|
||||
$this->maniaControl->manialinkManager->displayWidget($maniaLink, $player);
|
||||
$this->maniaControl->manialinkManager->sendManialink($maniaLink, $player->login);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -457,7 +457,7 @@ class QueuePlugin implements CallbackListener, CommandListener, ManialinkPageAns
|
||||
$messageLabel->setText('$090You got a free spot, enjoy playing!');
|
||||
$messageLabel->setStyle(Label_Text::STYLE_TextStaticSmall);
|
||||
|
||||
$this->maniaControl->manialinkManager->displayWidget($maniaLink, $player, 'Queue');
|
||||
$this->maniaControl->manialinkManager->sendManialink($maniaLink, $player->login);
|
||||
$this->showPlay[$player->login] = array('time' => time(), 'player' => $player);
|
||||
}
|
||||
|
||||
@ -468,6 +468,6 @@ class QueuePlugin implements CallbackListener, CommandListener, ManialinkPageAns
|
||||
*/
|
||||
private function hideQueueWidget(Player $player) {
|
||||
$maniaLink = new ManiaLink(self::ML_ID);
|
||||
$this->maniaControl->manialinkManager->displayWidget($maniaLink, $player, 'Queue');
|
||||
$this->maniaControl->manialinkManager->sendManialink($maniaLink, $player->login);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user