diff --git a/application/core/Players/PlayerCommands.php b/application/core/Players/PlayerCommands.php index 3c9f5f46..f52d4ca9 100644 --- a/application/core/Players/PlayerCommands.php +++ b/application/core/Players/PlayerCommands.php @@ -3,6 +3,7 @@ namespace ManiaControl\Players; use FML\Controls\Quads\Quad_Icons128x128_1; +use FML\Controls\Quads\Quad_Icons128x32_1; use FML\Controls\Quads\Quad_Icons64x64_1; use ManiaControl\Admin\AuthenticationManager; use ManiaControl\Commands\CommandListener; @@ -59,8 +60,8 @@ class PlayerCommands implements CommandListener, ManialinkPageAnswerListener { //Action Balance Teams $this->maniaControl->manialinkManager->registerManialinkPageAnswerListener(self::ACTION_BALANCE_TEAMS, $this, 'command_TeamBalance'); - $itemQuad = new Quad_Icons128x128_1(); - $itemQuad->setSubStyle($itemQuad::SUBSTYLE_ProfileVehicle); + $itemQuad = new Quad_Icons128x32_1(); + $itemQuad->setSubStyle($itemQuad::SUBSTYLE_RT_Team); $itemQuad->setAction(self::ACTION_BALANCE_TEAMS); $this->maniaControl->actionsMenu->addMenuItem($itemQuad, false, 9); diff --git a/application/core/Players/PlayerDetailed.php b/application/core/Players/PlayerDetailed.php index 15675c4d..2cdb4c20 100644 --- a/application/core/Players/PlayerDetailed.php +++ b/application/core/Players/PlayerDetailed.php @@ -4,6 +4,7 @@ namespace ManiaControl\Players; use FML\Controls\Control; use FML\Controls\Frame; +use FML\Controls\Labels\Label_Button; use FML\Controls\Labels\Label_Text; use FML\Controls\Quad; use FML\Controls\Quads\Quad_BgsPlayerCard; @@ -210,6 +211,15 @@ class PlayerDetailed { $frame->add($this->statisticsFrame($target)); + $quad = new Label_Button(); + $frame->add($quad); + $quad->setStyle($quad::STYLE_CardMain_Quit); + $quad->setHAlign(Control::LEFT); + $quad->setScale(0.75); + $quad->setText("Back to Playerlist"); + $quad->setPosition(-$this->width / 2 + 7, -$this->height / 2 + 7); + $quad->setAction(PlayerCommands::ACTION_OPEN_PLAYERLIST); + // render and display xml $this->maniaControl->manialinkManager->displayWidget($maniaLink, $player); } diff --git a/application/core/Players/PlayerList.php b/application/core/Players/PlayerList.php index 46f56b3b..b213ceae 100644 --- a/application/core/Players/PlayerList.php +++ b/application/core/Players/PlayerList.php @@ -137,9 +137,9 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener { $headFrame->setY($y - 5); // $array = array("Id" => $x + 5, "Nickname" => $x + 10, "Login" => $x + 40, "Ladder" => $x + 60,"Zone" => $x + 85); if($this->maniaControl->authenticationManager->checkRight($player, AuthenticationManager::AUTH_LEVEL_MODERATOR)) { - $array = array("Id" => $x + 5, "Nickname" => $x + 18, "Login" => $x + 60, "Location" => $x + 91, "Actions" => $x + 135); + $array = array("Id" => $x + 5, "Nickname" => $x + 18, "Login" => $x + 70, "Location" => $x + 101, "Actions" => $x + 135); } else { - $array = array("Id" => $x + 5, "Nickname" => $x + 18, "Login" => $x + 60, "Location" => $x + 91); + $array = array("Id" => $x + 5, "Nickname" => $x + 18, "Login" => $x + 70, "Location" => $x + 101); } $this->maniaControl->manialinkManager->labelLine($headFrame, $array); @@ -166,12 +166,12 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener { $lineQuad->setZ(0.001); } - $array = array($i => $x + 5, $listPlayer->nickname => $x + 18, $listPlayer->login => $x + 60, $path => $x + 91); + $array = array($i => $x + 5, $listPlayer->nickname => $x + 18, $listPlayer->login => $x + 70, $path => $x + 101); $frames = $this->maniaControl->manialinkManager->labelLine($playerFrame, $array); /** @var Label $nicknameLabel */ - $nicknameLabel = $frames[1]; - $nicknameLabel->setAction(self::ACTION_OPEN_PLAYER_DETAILED . '.' . $listPlayer->login); + //$nicknameLabel = $frames[1]; + //$nicknameLabel->setAction(self::ACTION_OPEN_PLAYER_DETAILED . '.' . $listPlayer->login); $playerFrame->setY($y); @@ -209,7 +209,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener { $playerFrame->add($countryQuad); $countryCode = Formatter::mapCountry($listPlayer->getCountry()); $countryQuad->setImage("file://Skins/Avatars/Flags/{$countryCode}.dds"); - $countryQuad->setX($x + 88); + $countryQuad->setX($x + 98); $countryQuad->setSize(4, 4); $countryQuad->setZ(-0.1); @@ -232,10 +232,33 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener { $script->addTooltip($rightLabel, $descriptionLabel, array(Script::OPTION_TOOLTIP_TEXT => $this->maniaControl->authenticationManager->getAuthLevelName($listPlayer->authLevel) . " " . $listPlayer->nickname)); + + // Player Statistics + $playerQuad = new Quad_Icons64x64_1(); + $playerFrame->add($playerQuad); + $playerQuad->setX($x + 61); + $playerQuad->setZ(20); + $playerQuad->setSubStyle($playerQuad::SUBSTYLE_TrackInfo); + $playerQuad->setSize(2.7, 2.7); + $playerQuad->setAction(self::ACTION_OPEN_PLAYER_DETAILED . "." . $listPlayer->login); + $script->addTooltip($playerQuad, $descriptionLabel, array(Script::OPTION_TOOLTIP_TEXT => "View Statistics of " . $listPlayer->nickname)); + + + // Camera Quad + $playerQuad = new Quad_UIConstruction_Buttons(); + $playerFrame->add($playerQuad); + $playerQuad->setX($x + 64.5); + $playerQuad->setZ(20); + $playerQuad->setSubStyle($playerQuad::SUBSTYLE_Camera); + $playerQuad->setSize(3.8, 3.8); + $script->addTooltip($playerQuad, $descriptionLabel, array(Script::OPTION_TOOLTIP_TEXT => "Spectate " . $listPlayer->nickname)); + $script->addProfileButton($playerQuad, $listPlayer->login); //TODO real action + + // Player Profile Quad $playerQuad = new Quad_UIConstruction_Buttons(); $playerFrame->add($playerQuad); - $playerQuad->setX($x + 58); + $playerQuad->setX($x + 68); $playerQuad->setZ(20); $playerQuad->setSubStyle($playerQuad::SUBSTYLE_Author); $playerQuad->setSize(3.8, 3.8); diff --git a/application/plugins/Donations.php b/application/plugins/Donations.php index 07ac689a..e35d0396 100644 --- a/application/plugins/Donations.php +++ b/application/plugins/Donations.php @@ -249,7 +249,7 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin { $descriptionLabel->setSize(40, 4); $descriptionLabel->setTextSize(2); $descriptionLabel->setVisible(true); - $descriptionLabel->setTextColor("FF0"); + $descriptionLabel->setTextColor("0F0"); // Add items $x = -2; @@ -258,7 +258,7 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin { $popoutFrame->add($label); $label->setX($x); $label->setHAlign(Control::RIGHT); - $label->setText('$ff0'.$value . '$700P'); + $label->setText('$s$FFF'.$value . '$09FP'); $label->setTextSize(1.2); $label->setAction(self::ACTION_DONATE_VALUE . "." . $value); $label->setStyle(Label_Text::STYLE_TextCardSmall);