protected function onConstruct()
 {
     $ui = new Bgs1InRace(40, 5.5);
     $ui->setSubStyle(Bgs1InRace::BgCardList);
     $ui->setHalign('center');
     $this->addComponent($ui);
     $ui = new Label(38, 5);
     $ui->setStyle(Label::TrackerTextBig);
     $ui->setHalign('center');
     $ui->setPosition(0, -1);
     $ui->setText('Free spot. Have fun !');
     $this->addComponent($ui);
     $this->setPosition(Config::getInstance()->posX, Config::getInstance()->posY - 29.5);
 }
Example #2
0
 static function Add($player)
 {
     if (!isset(self::$labelsByLogin[$player->login])) {
         if (count(self::$labelsByLogin) > 0 && count(self::$labelsByLogin) % 8 == 0) {
             self::$background->setSizeX(self::$background->getSizeX() + 31);
             self::$queuedPlayers->setPosX(self::$queuedPlayers->getPosX() - 15.5);
             $separator = new Bgs1InRace(0.6, 28);
             $separator->setSubStyle(Bgs1InRace::Glow);
             $separator->setPosY(2);
             self::$columnSeparators[] = $separator;
             self::$queuedPlayers->addComponent($separator);
         }
         $ui = new Label(30, 3);
         $ui->setStyle(Label::TextPlayerCardName);
         $ui->setText($player->nickName);
         self::$labelsByLogin[$player->login] = $ui;
         self::$queuedPlayers->addComponent($ui);
         self::$queuedPlayers->redraw();
     }
 }
Example #3
0
 static function displayErrorPage()
 {
     Manialink::load();
     Manialink::beginFrame(-70, 35, 0.1);
     $ui = new Bgs1InRace(143, 63);
     $ui->setSubStyle(Bgs1InRace::Shadow);
     $ui->save();
     $ui = new \ManiaLib\Gui\Elements\Quad(140, 60);
     $ui->setPosition(1.5, -1.5, 0.1);
     $ui->setBgcolor('fffe');
     $ui->save();
     $ui = new Label(110);
     $ui->setPosition(6, -6, 0.2);
     $ui->setStyle(Label::TextButtonMedium);
     $ui->setText('' . 'Please update maniaplanet');
     $ui->save();
     $ui = new Label(131);
     $ui->setPosition(6, -13, 0.2);
     $ui->enableAutonewline();
     $ui->setStyle(Label::TextTips);
     $ui->setText('You cannot display this content because your Maniaplanet ' . 'version is not up-to-date. Please update Maniaplanet to ' . 'the latest version. While it should be automatic, you can ' . 'find help and more information on the Maniaplanet Wiki: ');
     $ui->save();
     $ui = new Label(131);
     $ui->setAlign('center', 'center');
     $ui->setPosition(71.5, -35, 0.2);
     $ui->setStyle(Label::TextChallengeNameMedalNone);
     $ui->setUrl('http://wiki.maniaplanet.com/en/Changelog');
     $ui->setText('wiki.maniaplanet.com/en/Changelog');
     $ui->save();
     $ui = new Label(131);
     $ui->setValign('bottom');
     $ui->setPosition(5, -57, 0.2);
     $ui->enableAutonewline();
     $ui->setStyle(Label::TextTips);
     $ui->setText('Thank you for your understanding,' . "\n" . 'Nadeo Team');
     $ui->save();
     Manialink::endFrame();
     Manialink::render();
 }