minor changes

This commit is contained in:
Steffen Schröder 2014-05-24 20:39:18 +02:00
parent 62c51eef5b
commit ca4df9d89a
5 changed files with 10 additions and 9 deletions

View File

@ -28,9 +28,9 @@ class AdminLists implements ManialinkPageAnswerListener, CallbackListener {
/* /*
* Constants * Constants
*/ */
const ACTION_OPEN_ADMINLISTS = "AdminList.OpenAdminLists"; const ACTION_OPEN_ADMINLIST = 'AdminList.OpenAdminList';
const ACTION_REVOKE_RIGHTS = "AdminList.RevokeRights"; const ACTION_REVOKE_RIGHTS = 'AdminList.RevokeRights';
const MAX_PLAYERS_PER_PAGE = 15; const MAX_PLAYERS_PER_PAGE = 15;
/* /*
* Private Properties * Private Properties
@ -51,10 +51,10 @@ class AdminLists implements ManialinkPageAnswerListener, CallbackListener {
$this->maniaControl->callbackManager->registerCallbackListener(AuthenticationManager::CB_AUTH_LEVEL_CHANGED, $this, 'updateWidget'); $this->maniaControl->callbackManager->registerCallbackListener(AuthenticationManager::CB_AUTH_LEVEL_CHANGED, $this, 'updateWidget');
// Menu Entry AdminList // Menu Entry AdminList
$this->maniaControl->manialinkManager->registerManialinkPageAnswerListener(self::ACTION_OPEN_ADMINLISTS, $this, 'openAdminList'); $this->maniaControl->manialinkManager->registerManialinkPageAnswerListener(self::ACTION_OPEN_ADMINLIST, $this, 'openAdminList');
$itemQuad = new Quad_UIConstruction_Buttons(); $itemQuad = new Quad_UIConstruction_Buttons();
$itemQuad->setSubStyle($itemQuad::SUBSTYLE_Author); $itemQuad->setSubStyle($itemQuad::SUBSTYLE_Author);
$itemQuad->setAction(self::ACTION_OPEN_ADMINLISTS); $itemQuad->setAction(self::ACTION_OPEN_ADMINLIST);
$this->maniaControl->actionsMenu->addMenuItem($itemQuad, false, 50, 'Open AdminList'); $this->maniaControl->actionsMenu->addMenuItem($itemQuad, false, 50, 'Open AdminList');
} }

View File

@ -21,6 +21,7 @@ abstract class BaseCallback {
public $pid = null; public $pid = null;
public $login = null; public $login = null;
/** @var Player $player */
public $player = null; public $player = null;
/** /**

View File

@ -29,8 +29,8 @@ abstract class ColorUtil {
if ($value > 0.5) { if ($value > 0.5) {
$red = 2. * (1. - $value); $red = 2. * (1. - $value);
} }
$red = ColorUtil::floatToCode($red); $red = self::floatToCode($red);
$green = ColorUtil::floatToCode($green); $green = self::floatToCode($green);
return $red . $green . '0'; return $red . $green . '0';
} }

View File

@ -314,7 +314,7 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
$label->setText($queuedMaps[$map->uid]); $label->setText($queuedMaps[$map->uid]);
$label->setTextColor('fff'); $label->setTextColor('fff');
// Checks if the Player who openend the Widget has queued the map // Checks if the Player who opened the Widget has queued the map
$queuer = $this->maniaControl->mapManager->mapQueue->getQueuer($map->uid); $queuer = $this->maniaControl->mapManager->mapQueue->getQueuer($map->uid);
if ($queuer->login == $player->login) { if ($queuer->login == $player->login) {
$description = 'Remove $<' . $map->name . '$> from the Map Queue'; $description = 'Remove $<' . $map->name . '$> from the Map Queue';

View File

@ -242,7 +242,7 @@ class CustomVotesPlugin implements CommandListener, CallbackListener, ManialinkP
$itemQuad = new Quad_Icons64x64_1(); $itemQuad = new Quad_Icons64x64_1();
$itemQuad->setSubStyle($itemQuad::SUBSTYLE_ArrowFastNext); $itemQuad->setSubStyle($itemQuad::SUBSTYLE_ArrowFastNext);
$itemQuad->setAction(self::ACTION_START_VOTE . 'skipmap'); $itemQuad->setAction(self::ACTION_START_VOTE . 'skipmap');
$this->addVoteMenuItem($itemQuad, 15, 'Vote for a Mapskip'); $this->addVoteMenuItem($itemQuad, 15, 'Vote for a Map Skip');
if ($this->maniaControl->server->isTeamMode()) { if ($this->maniaControl->server->isTeamMode()) {
//Menu TeamBalance //Menu TeamBalance