Reordered Admin menu

This commit is contained in:
Jocy 2017-04-19 19:37:36 +02:00
parent 01bc21e37b
commit d21c1c4c70
3 changed files with 6 additions and 8 deletions

View File

@ -239,7 +239,7 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
$labelLine->setY(-7); $labelLine->setY(-7);
$labelLine->render(); $labelLine->render();
$searchFrame = $this->maniaControl->getManialinkManager()->getStyleManager()->getDefaultMapSearch(self::ACTION_SEARCH_MAP_NAME,self::ACTION_SEARCH_AUTHOR); $searchFrame = $this->maniaControl->getManialinkManager()->getStyleManager()->getDefaultMapSearch(self::ACTION_SEARCH_MAP_NAME, self::ACTION_SEARCH_AUTHOR);
$headFrame->addChild($searchFrame); $headFrame->addChild($searchFrame);
// Predefine description Label // Predefine description Label
@ -739,7 +739,7 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
* @internal * @internal
*/ */
public function searchByMapName(array $callback) { public function searchByMapName(array $callback) {
$login = $callback[1][1]; $login = $callback[1][1];
$player = $this->maniaControl->getPlayerManager()->getPlayer($login); $player = $this->maniaControl->getPlayerManager()->getPlayer($login);
$searchString = $callback[1][3][0]['Value']; $searchString = $callback[1][3][0]['Value'];
@ -755,7 +755,7 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
* @internal * @internal
*/ */
public function searchByAuthor(array $callback) { public function searchByAuthor(array $callback) {
$login = $callback[1][1]; $login = $callback[1][1];
$player = $this->maniaControl->getPlayerManager()->getPlayer($login); $player = $this->maniaControl->getPlayerManager()->getPlayer($login);
$searchString = $callback[1][3][0]['Value']; $searchString = $callback[1][3][0]['Value'];

View File

@ -43,8 +43,6 @@ class ScriptManager implements UsageInformationAble {
/** /**
* Enable script callbacks * Enable script callbacks
*
* @param bool $enable
* @return bool * @return bool
*/ */
public function enableScriptCallbacks() { public function enableScriptCallbacks() {

View File

@ -116,7 +116,7 @@ class Commands implements CallbackListener, CommandListener, ManialinkPageAnswer
$itemQuad = new Quad_Icons128x32_1(); $itemQuad = new Quad_Icons128x32_1();
$itemQuad->setSubStyle($itemQuad::SUBSTYLE_ManiaLinkSwitch); $itemQuad->setSubStyle($itemQuad::SUBSTYLE_ManiaLinkSwitch);
$itemQuad->setAction(self::ACTION_SET_PAUSE); $itemQuad->setAction(self::ACTION_SET_PAUSE);
$this->maniaControl->getActionsMenu()->addAdminMenuItem($itemQuad, 13, 'Pause the current game'); $this->maniaControl->getActionsMenu()->addAdminMenuItem($itemQuad, 32, 'Pause the current game');
} }
} }
@ -132,13 +132,13 @@ class Commands implements CallbackListener, CommandListener, ManialinkPageAnswer
$itemQuad = new Quad_BgRaceScore2(); $itemQuad = new Quad_BgRaceScore2();
$itemQuad->setSubStyle($itemQuad::SUBSTYLE_SendScore); $itemQuad->setSubStyle($itemQuad::SUBSTYLE_SendScore);
$itemQuad->setAction(self::ACTION_EXTEND_WARMUP); $itemQuad->setAction(self::ACTION_EXTEND_WARMUP);
$this->maniaControl->getActionsMenu()->addMenuItem($itemQuad, false, 14, 'Extend Warmup'); $this->maniaControl->getActionsMenu()->addMenuItem($itemQuad, false, 22, 'Extend Warmup');
// Stop WarmUp menu item // Stop WarmUp menu item
$itemQuad = new Quad_Icons64x64_1(); $itemQuad = new Quad_Icons64x64_1();
$itemQuad->setSubStyle($itemQuad::SUBSTYLE_ArrowGreen); $itemQuad->setSubStyle($itemQuad::SUBSTYLE_ArrowGreen);
$itemQuad->setAction(self::ACTION_END_WARMUP); $itemQuad->setAction(self::ACTION_END_WARMUP);
$this->maniaControl->getActionsMenu()->addMenuItem($itemQuad, false, 15, 'End Warmup'); $this->maniaControl->getActionsMenu()->addMenuItem($itemQuad, false, 24, 'End Warmup');
} else { } else {
$this->maniaControl->getActionsMenu()->removeMenuItem(14, false); $this->maniaControl->getActionsMenu()->removeMenuItem(14, false);
$this->maniaControl->getActionsMenu()->removeMenuItem(15, false); $this->maniaControl->getActionsMenu()->removeMenuItem(15, false);