Fixed z-values for playerlist

Fixed advanced actions in playerslist
Added z value to the labelline
This commit is contained in:
Jocy 2017-03-28 16:00:40 +02:00
parent c318f26d68
commit fa9e9a0f5c
2 changed files with 53 additions and 43 deletions

View File

@ -377,6 +377,7 @@ class ManialinkManager implements ManialinkPageAnswerListener, CallbackListener,
$textSize = (isset($properties['textSize']) ? $properties['textSize'] : 1.5); $textSize = (isset($properties['textSize']) ? $properties['textSize'] : 1.5);
$textColor = (isset($properties['textColor']) ? $properties['textColor'] : 'FFF'); $textColor = (isset($properties['textColor']) ? $properties['textColor'] : 'FFF');
$profile = (isset($properties['profile']) ? $properties['profile'] : false); $profile = (isset($properties['profile']) ? $properties['profile'] : false);
$posZ = (isset($properties['posZ']) ? $properties['posZ'] : 0);
$labels = array(); $labels = array();
@ -394,6 +395,7 @@ class ManialinkManager implements ManialinkPageAnswerListener, CallbackListener,
$frame->addChild($label); $frame->addChild($label);
$label->setHorizontalAlign($hAlign); $label->setHorizontalAlign($hAlign);
$label->setX($x); $label->setX($x);
$label->setZ($posZ);
$label->setStyle($style); $label->setStyle($style);
$label->setTextSize($textSize); $label->setTextSize($textSize);
$label->setText($texts[$key]); $label->setText($texts[$key]);
@ -411,6 +413,7 @@ class ManialinkManager implements ManialinkPageAnswerListener, CallbackListener,
$frame->addChild($label); $frame->addChild($label);
$label->setHorizontalAlign($hAlign); $label->setHorizontalAlign($hAlign);
$label->setX($x); $label->setX($x);
$label->setZ($posZ);
$label->setStyle($style); $label->setStyle($style);
$label->setTextSize($textSize); $label->setTextSize($textSize);
$label->setText($text); $label->setText($text);

View File

@ -155,6 +155,10 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
$posX = -$width / 2; $posX = -$width / 2;
$posY = $height / 2; $posY = $height / 2;
// Define z-values
$foregroundZ = 1;
$backgroundZ = 0.5;
// Predefine Description Label // Predefine Description Label
$descriptionLabel = $this->maniaControl->getManialinkManager()->getStyleManager()->getDefaultDescriptionLabel(); $descriptionLabel = $this->maniaControl->getManialinkManager()->getStyleManager()->getDefaultDescriptionLabel();
$frame->addChild($descriptionLabel); $frame->addChild($descriptionLabel);
@ -192,12 +196,12 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
$playerFrame->addChild($lineQuad); $playerFrame->addChild($lineQuad);
$lineQuad->setSize($width, 4); $lineQuad->setSize($width, 4);
$lineQuad->setSubStyle($lineQuad::SUBSTYLE_BgPlayerCardBig); $lineQuad->setSubStyle($lineQuad::SUBSTYLE_BgPlayerCardBig);
$lineQuad->setZ(0.001); $lineQuad->setZ($backgroundZ);
} }
$positions = array($posX + 5, $posX + 18, $posX + 70, $posX + 101); $positions = array($posX + 5, $posX + 18, $posX + 70, $posX + 101);
$texts = array($index, $listPlayer->nickname, $listPlayer->login, $path); $texts = array($index, $listPlayer->nickname, $listPlayer->login, $path);
$this->maniaControl->getManialinkManager()->labelLine($playerFrame, array($positions, $texts)); $this->maniaControl->getManialinkManager()->labelLine($playerFrame, array($positions, $texts), array('posZ' => $foregroundZ));
$playerFrame->setY($posY); $playerFrame->setY($posY);
@ -206,7 +210,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
$currentQuad = new Quad_Icons64x64_1(); $currentQuad = new Quad_Icons64x64_1();
$playerFrame->addChild($currentQuad); $playerFrame->addChild($currentQuad);
$currentQuad->setX($posX + 3.5); $currentQuad->setX($posX + 3.5);
$currentQuad->setZ(0.2); $currentQuad->setZ($foregroundZ);
$currentQuad->setSize(4, 4); $currentQuad->setSize(4, 4);
$currentQuad->setSubStyle($currentQuad::SUBSTYLE_ArrowBlue); $currentQuad->setSubStyle($currentQuad::SUBSTYLE_ArrowBlue);
} }
@ -217,7 +221,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
$teamQuad = new Quad_Emblems(); $teamQuad = new Quad_Emblems();
$playerFrame->addChild($teamQuad); $playerFrame->addChild($teamQuad);
$teamQuad->setX($posX + 10); $teamQuad->setX($posX + 10);
$teamQuad->setZ(0.1); $teamQuad->setZ($foregroundZ);
$teamQuad->setSize(3.8, 3.8); $teamQuad->setSize(3.8, 3.8);
switch ($listPlayer->teamId) { switch ($listPlayer->teamId) {
@ -233,7 +237,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
$specQuad = new Quad_BgRaceScore2(); $specQuad = new Quad_BgRaceScore2();
$playerFrame->addChild($specQuad); $playerFrame->addChild($specQuad);
$specQuad->setX($posX + 10); $specQuad->setX($posX + 10);
$specQuad->setZ(0.1); $specQuad->setZ($foregroundZ);
$specQuad->setSubStyle($specQuad::SUBSTYLE_Spectator); $specQuad->setSubStyle($specQuad::SUBSTYLE_Spectator);
$specQuad->setSize(3.8, 3.8); $specQuad->setSize(3.8, 3.8);
} }
@ -245,7 +249,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
$playerFrame->addChild($countryQuad); $playerFrame->addChild($countryQuad);
$countryQuad->setImageUrl("file://ZoneFlags/Login/{$listPlayer->login}/country"); $countryQuad->setImageUrl("file://ZoneFlags/Login/{$listPlayer->login}/country");
$countryQuad->setX($posX + 98); $countryQuad->setX($posX + 98);
$countryQuad->setZ(1); $countryQuad->setZ($foregroundZ);
$countryQuad->setSize(4, 4); $countryQuad->setSize(4, 4);
$countryQuad->addTooltipLabelFeature($descriptionLabel, '$<' . $listPlayer->nickname . '$> from ' . $listPlayer->path); $countryQuad->addTooltipLabelFeature($descriptionLabel, '$<' . $listPlayer->nickname . '$> from ' . $listPlayer->path);
@ -255,14 +259,14 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
$rightQuad = new Quad_BgRaceScore2(); $rightQuad = new Quad_BgRaceScore2();
$playerFrame->addChild($rightQuad); $playerFrame->addChild($rightQuad);
$rightQuad->setX($posX + 13); $rightQuad->setX($posX + 13);
$rightQuad->setZ(3); $rightQuad->setZ($foregroundZ);
$rightQuad->setSize(7, 3.5); $rightQuad->setSize(7, 3.5);
$rightQuad->setSubStyle($rightQuad::SUBSTYLE_CupFinisher); $rightQuad->setSubStyle($rightQuad::SUBSTYLE_CupFinisher);
$rightLabel = new Label_Text(); $rightLabel = new Label_Text();
$playerFrame->addChild($rightLabel); $playerFrame->addChild($rightLabel);
$rightLabel->setX($posX + 13.9); $rightLabel->setX($posX + 13.9);
$rightLabel->setZ(3.1); $rightLabel->setZ($foregroundZ);
$rightLabel->setText($this->maniaControl->getAuthenticationManager()->getAuthLevelAbbreviation($listPlayer->authLevel)); $rightLabel->setText($this->maniaControl->getAuthenticationManager()->getAuthLevelAbbreviation($listPlayer->authLevel));
$rightLabel->setTextSize(0.8); $rightLabel->setTextSize(0.8);
$rightLabel->setTextColor('fff'); $rightLabel->setTextColor('fff');
@ -274,7 +278,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
$playerQuad = new Quad_Icons64x64_1(); $playerQuad = new Quad_Icons64x64_1();
$playerFrame->addChild($playerQuad); $playerFrame->addChild($playerQuad);
$playerQuad->setX($posX + 61); $playerQuad->setX($posX + 61);
$playerQuad->setZ(3); $playerQuad->setZ($foregroundZ);
$playerQuad->setSize(2.7, 2.7); $playerQuad->setSize(2.7, 2.7);
$playerQuad->setSubStyle($playerQuad::SUBSTYLE_TrackInfo); $playerQuad->setSubStyle($playerQuad::SUBSTYLE_TrackInfo);
$playerQuad->setAction(self::ACTION_OPEN_PLAYER_DETAILED . '.' . $listPlayer->login); $playerQuad->setAction(self::ACTION_OPEN_PLAYER_DETAILED . '.' . $listPlayer->login);
@ -285,7 +289,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
$playerQuad = new Quad_UIConstruction_Buttons(); $playerQuad = new Quad_UIConstruction_Buttons();
$playerFrame->addChild($playerQuad); $playerFrame->addChild($playerQuad);
$playerQuad->setX($posX + 64.5); $playerQuad->setX($posX + 64.5);
$playerQuad->setZ(3); $playerQuad->setZ($foregroundZ);
$playerQuad->setSize(3.8, 3.8); $playerQuad->setSize(3.8, 3.8);
$playerQuad->setSubStyle($playerQuad::SUBSTYLE_Camera); $playerQuad->setSubStyle($playerQuad::SUBSTYLE_Camera);
$description = 'Spectate $<' . $listPlayer->nickname . '$>'; $description = 'Spectate $<' . $listPlayer->nickname . '$>';
@ -296,7 +300,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
$playerQuad = new Quad_UIConstruction_Buttons(); $playerQuad = new Quad_UIConstruction_Buttons();
$playerFrame->addChild($playerQuad); $playerFrame->addChild($playerQuad);
$playerQuad->setX($posX + 68); $playerQuad->setX($posX + 68);
$playerQuad->setZ(3); $playerQuad->setZ($foregroundZ);
$playerQuad->setSize(3.8, 3.8); $playerQuad->setSize(3.8, 3.8);
$playerQuad->setSubStyle($playerQuad::SUBSTYLE_Author); $playerQuad->setSubStyle($playerQuad::SUBSTYLE_Author);
$playerQuad->addPlayerProfileFeature($listPlayer->login); $playerQuad->addPlayerProfileFeature($listPlayer->login);
@ -310,7 +314,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
$playerQuad = new Quad_Icons64x64_1(); $playerQuad = new Quad_Icons64x64_1();
$playerFrame->addChild($playerQuad); $playerFrame->addChild($playerQuad);
$playerQuad->setX($posX + 132); $playerQuad->setX($posX + 132);
$playerQuad->setZ(0.1); $playerQuad->setZ($foregroundZ);
$playerQuad->setSize(3.8, 3.8); $playerQuad->setSize(3.8, 3.8);
$playerQuad->setSubStyle($playerQuad::SUBSTYLE_Buddy); $playerQuad->setSubStyle($playerQuad::SUBSTYLE_Buddy);
$playerQuad->setAction(self::ACTION_PLAYER_ADV . '.' . $listPlayer->login); $playerQuad->setAction(self::ACTION_PLAYER_ADV . '.' . $listPlayer->login);
@ -326,7 +330,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
$redQuad = new Quad_Emblems(); $redQuad = new Quad_Emblems();
$playerFrame->addChild($redQuad); $playerFrame->addChild($redQuad);
$redQuad->setX($posX + 145); $redQuad->setX($posX + 145);
$redQuad->setZ(0.1); $redQuad->setZ($foregroundZ);
$redQuad->setSize(3.8, 3.8); $redQuad->setSize(3.8, 3.8);
$redQuad->setSubStyle($redQuad::SUBSTYLE_2); $redQuad->setSubStyle($redQuad::SUBSTYLE_2);
$redQuad->setAction(self::ACTION_FORCE_RED . '.' . $listPlayer->login); $redQuad->setAction(self::ACTION_FORCE_RED . '.' . $listPlayer->login);
@ -339,7 +343,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
$blueQuad = new Quad_Emblems(); $blueQuad = new Quad_Emblems();
$playerFrame->addChild($blueQuad); $playerFrame->addChild($blueQuad);
$blueQuad->setX($posX + 141); $blueQuad->setX($posX + 141);
$blueQuad->setZ(0.1); $blueQuad->setZ($foregroundZ);
$blueQuad->setSize(3.8, 3.8); $blueQuad->setSize(3.8, 3.8);
$blueQuad->setSubStyle($blueQuad::SUBSTYLE_1); $blueQuad->setSubStyle($blueQuad::SUBSTYLE_1);
$blueQuad->setAction(self::ACTION_FORCE_BLUE . '.' . $listPlayer->login); $blueQuad->setAction(self::ACTION_FORCE_BLUE . '.' . $listPlayer->login);
@ -353,7 +357,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
$kickQuad = new Quad_UIConstruction_Buttons(); $kickQuad = new Quad_UIConstruction_Buttons();
$playerFrame->addChild($kickQuad); $playerFrame->addChild($kickQuad);
$kickQuad->setX($posX + 141); $kickQuad->setX($posX + 141);
$kickQuad->setZ(0.1); $kickQuad->setZ($foregroundZ);
$kickQuad->setSize(3.8, 3.8); $kickQuad->setSize(3.8, 3.8);
$kickQuad->setSubStyle($kickQuad::SUBSTYLE_Validate_Step2); $kickQuad->setSubStyle($kickQuad::SUBSTYLE_Validate_Step2);
$kickQuad->setAction(self::ACTION_KICK_PLAYER_VOTE . '.' . $listPlayer->login); $kickQuad->setAction(self::ACTION_KICK_PLAYER_VOTE . '.' . $listPlayer->login);
@ -367,7 +371,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
$playQuad = new Quad_Emblems(); $playQuad = new Quad_Emblems();
$playerFrame->addChild($playQuad); $playerFrame->addChild($playQuad);
$playQuad->setX($posX + 143); $playQuad->setX($posX + 143);
$playQuad->setZ(0.1); $playQuad->setZ($foregroundZ);
$playQuad->setSize(3.8, 3.8); $playQuad->setSize(3.8, 3.8);
$playQuad->setSubStyle($playQuad::SUBSTYLE_2); $playQuad->setSubStyle($playQuad::SUBSTYLE_2);
$playQuad->setAction(self::ACTION_FORCE_PLAY . '.' . $listPlayer->login); $playQuad->setAction(self::ACTION_FORCE_PLAY . '.' . $listPlayer->login);
@ -382,7 +386,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
$spectatorQuad = new Quad_BgRaceScore2(); $spectatorQuad = new Quad_BgRaceScore2();
$playerFrame->addChild($spectatorQuad); $playerFrame->addChild($spectatorQuad);
$spectatorQuad->setX($posX + 137); $spectatorQuad->setX($posX + 137);
$spectatorQuad->setZ(0.1); $spectatorQuad->setZ($foregroundZ);
$spectatorQuad->setSize(3.8, 3.8); $spectatorQuad->setSize(3.8, 3.8);
$spectatorQuad->setSubStyle($spectatorQuad::SUBSTYLE_Spectator); $spectatorQuad->setSubStyle($spectatorQuad::SUBSTYLE_Spectator);
$spectatorQuad->setAction(self::ACTION_FORCE_SPEC . '.' . $listPlayer->login); $spectatorQuad->setAction(self::ACTION_FORCE_SPEC . '.' . $listPlayer->login);
@ -395,7 +399,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
$spectatorQuad = new Quad_BgRaceScore2(); $spectatorQuad = new Quad_BgRaceScore2();
$playerFrame->addChild($spectatorQuad); $playerFrame->addChild($spectatorQuad);
$spectatorQuad->setX($posX + 137); $spectatorQuad->setX($posX + 137);
$spectatorQuad->setZ(0.1); $spectatorQuad->setZ($foregroundZ);
$spectatorQuad->setSize(3.8, 3.8); $spectatorQuad->setSize(3.8, 3.8);
$spectatorQuad->setSubStyle($spectatorQuad::SUBSTYLE_Spectator); $spectatorQuad->setSubStyle($spectatorQuad::SUBSTYLE_Spectator);
$spectatorQuad->setAction(self::ACTION_FORCE_SPEC_VOTE . '.' . $listPlayer->login); $spectatorQuad->setAction(self::ACTION_FORCE_SPEC_VOTE . '.' . $listPlayer->login);
@ -435,9 +439,8 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
$quadSubstyle = $this->maniaControl->getManialinkManager()->getStyleManager()->getDefaultMainWindowSubStyle(); $quadSubstyle = $this->maniaControl->getManialinkManager()->getStyleManager()->getDefaultMainWindowSubStyle();
//Settings //Settings
$posX = $width / 2 + 2.5; $posX = $width / 2 + 0.2;
$width = 35; $width = 35;
$height = $height * 0.75;
$textSize = 1.5; $textSize = 1.5;
$textColor = 'fff'; $textColor = 'fff';
$quadWidth = $width - 7; $quadWidth = $width - 7;
@ -450,7 +453,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
// Add Close Quad (X) // Add Close Quad (X)
$closeQuad = new Quad_Icons64x64_1(); $closeQuad = new Quad_Icons64x64_1();
$frame->addChild($closeQuad); $frame->addChild($closeQuad);
$closeQuad->setPosition($width * 0.4, $height * 0.43, 3); $closeQuad->setPosition($width / 2 - 2.5, $height / 2 - 2.5, 3);
$closeQuad->setSize(6, 6); $closeQuad->setSize(6, 6);
$closeQuad->setSubStyle($closeQuad::SUBSTYLE_QuitRace); $closeQuad->setSubStyle($closeQuad::SUBSTYLE_QuitRace);
$closeQuad->setAction(self::ACTION_CLOSE_PLAYER_ADV); $closeQuad->setAction(self::ACTION_CLOSE_PLAYER_ADV);
@ -459,16 +462,8 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
$backgroundQuad = new Quad(); $backgroundQuad = new Quad();
$frame->addChild($backgroundQuad); $frame->addChild($backgroundQuad);
$backgroundQuad->setSize($width, $height); $backgroundQuad->setSize($width, $height);
$backgroundQuad->setImageUrl('https://dl.dropboxusercontent.com/u/105352981/Stuff/CAM%20SM%20BORDER%20PNG.png'); //TODO just a test
//$backgroundQuad->setStyles($quadStyle, $quadSubstyle);
$backgroundQuad->setZ(-0.3);
// Background Quad
$backgroundQuad = new Quad();
$frame->addChild($backgroundQuad);
$backgroundQuad->setSize($width - 2, $height - 2);
$backgroundQuad->setStyles($quadStyle, $quadSubstyle); $backgroundQuad->setStyles($quadStyle, $quadSubstyle);
$backgroundQuad->setZ(-0.4); $backgroundQuad->setZ(-0.3);
// Show headline // Show headline
$label = new Label_Text(); $label = new Label_Text();
@ -481,26 +476,38 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
$label->setText('Advanced Actions'); $label->setText('Advanced Actions');
$label->setTextColor($textColor); $label->setTextColor($textColor);
//Nickname background
$quad = new Quad();
$frame->addChild($quad);
$quad->setPosition(0, $height / 2 - 10, -0.1);
$quad->setStyles($quadStyle, $quadSubstyle);
$quad->setSize($width, 5);
// Show Nickname // Show Nickname
$label = new Label_Text(); $label = new Label_Text();
$frame->addChild($label); $frame->addChild($label);
$label->setHorizontalAlign($label::LEFT); $label->setWidth($width * 0.9);
$label->setX(0); $label->setY($height / 2 - 10);
$label->setY($height / 2 - 8);
$label->setStyle($label::STYLE_TextCardSmall); $label->setStyle($label::STYLE_TextCardSmall);
$label->setTextSize($textSize); $label->setTextSize($textSize);
$label->setText($player->nickname); $label->setText($player->nickname);
$label->setTextColor($textColor); $label->setTextColor($textColor);
$label->setHorizontalAlign($label::CENTER);
// Mute Player $buttonSpacing = 6.5;
$posY = $height / 2 - 14;
// Background for Buttons
$posY = $height / 2 - 20;
$quad = new Quad_BgsPlayerCard(); $quad = new Quad_BgsPlayerCard();
$frame->addChild($quad); $frame->addChild($quad);
$quad->setX(0); $quad->setX(0);
$quad->setY($posY); $quad->setY($posY);
$quad->setZ(-0.1);
$quad->setSubStyle($quad::SUBSTYLE_BgPlayerCardBig); $quad->setSubStyle($quad::SUBSTYLE_BgPlayerCardBig);
$quad->setSize($quadWidth, 5); $quad->setSize($quadWidth, 5);
// Mute Button
$label = new Label_Text(); $label = new Label_Text();
$frame->addChild($label); $frame->addChild($label);
$label->setX(0); $label->setX(0);
@ -518,7 +525,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
} }
// Warn Player // Warn Player
$posY -= 5; $posY -= $buttonSpacing;
$quad = clone $quad; $quad = clone $quad;
$frame->addChild($quad); $frame->addChild($quad);
$quad->setY($posY); $quad->setY($posY);
@ -530,7 +537,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
$label->setText('Warn'); $label->setText('Warn');
$label->setTextColor($textColor); $label->setTextColor($textColor);
$posY -= 5; $posY -= $buttonSpacing;
// Show Kick // Show Kick
$quad = clone $quad; $quad = clone $quad;
@ -544,7 +551,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
$label->setText('Kick'); $label->setText('Kick');
$label->setTextColor('f90'); $label->setTextColor('f90');
$posY -= 5; $posY -= $buttonSpacing;
// Show Ban // Show Ban
$quad = clone $quad; $quad = clone $quad;
$frame->addChild($quad); $frame->addChild($quad);
@ -557,7 +564,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
$label->setText('Ban'); $label->setText('Ban');
$label->setTextColor('700'); $label->setTextColor('700');
$posY -= 10; $posY -= $buttonSpacing * 2;
// Show Add as Master-Admin // Show Add as Master-Admin
$quad = clone $quad; $quad = clone $quad;
$frame->addChild($quad); $frame->addChild($quad);
@ -570,7 +577,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
$label->setText('Set SuperAdmin'); $label->setText('Set SuperAdmin');
$label->setTextColor($textColor); $label->setTextColor($textColor);
$posY -= 5; $posY -= $buttonSpacing;
// Show Add as Admin // Show Add as Admin
$quad = clone $quad; $quad = clone $quad;
$frame->addChild($quad); $frame->addChild($quad);
@ -583,7 +590,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
$label->setText('Set Admin'); $label->setText('Set Admin');
$label->setTextColor($textColor); $label->setTextColor($textColor);
$posY -= 5; $posY -= $buttonSpacing;
// Show Add as Moderator // Show Add as Moderator
$quad = clone $quad; $quad = clone $quad;
$frame->addChild($quad); $frame->addChild($quad);
@ -599,7 +606,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
if ($player->authLevel > 0 if ($player->authLevel > 0
&& $this->maniaControl->getAuthenticationManager()->checkRight($admin, $player->authLevel + 1) && $this->maniaControl->getAuthenticationManager()->checkRight($admin, $player->authLevel + 1)
) { ) {
$posY -= 5; $posY -= $buttonSpacing;
// Revoke Rights // Revoke Rights
$quad = clone $quad; $quad = clone $quad;
$frame->addChild($quad); $frame->addChild($quad);