protected function onConstruct()
 {
     $this->setLayer(\ManiaLive\Gui\Window::LAYER_CUT_SCENE);
     $this->setSize(self::SIZE_X, self::SIZE_Y);
     $this->setAlign('right', 'center');
     //162
     $this->setPosition(163, 0, 15);
     $this->bg = new \ManiaLib\Gui\Elements\Quad(self::SIZE_X, self::SIZE_Y);
     $this->bg->setImage('file://Media/Manialinks/Common/Lobbies/side-frame.png', true);
     $this->addComponent($this->bg);
     $this->title = new Elements\Label(self::SIZE_X);
     $this->title->setAlign('center');
     $this->title->setPosition(self::SIZE_X / 2, -6);
     $this->title->setStyle(Elements\Label::TextRaceMessage);
     $this->title->setOpacity(0.9);
     $this->title->setTextid('title');
     $this->addComponent($this->title);
     $this->frame = new \ManiaLive\Gui\Controls\Frame(2.2, -15, new \ManiaLib\Gui\Layouts\Column());
     $this->frame->getLayout()->setMarginHeight(0.5);
     $this->addComponent($this->frame);
     // $this->pager = new \ManiaLive\Gui\Controls\Pager();
     // $this->pager->setPosition(2.2,-15);
     // $this->pager->setSize(40, 110);
     // $this->pager->pageNavigatorFrame->setPosition(5,5);
     // $this->pager->label->setTextColor('fff');
     // $this->addComponent($this->pager);
 }
예제 #2
0
 function __construct()
 {
     parent::__construct(70, 180);
     $this->setSubStyle(Bgs1::BgWindow1);
     $this->setPosition(-150, 90, 0.1);
     $this->titleBg = new Quad(70, 70);
     $this->titleBg->setImage(Config::getInstance()->titleBgURL, true);
     $this->addCardElement($this->titleBg);
     $this->logo = new Icons128x128_1(16);
     $this->logo->setPosition(4, -38, 0.1);
     $this->logo->setSubStyle(Icons128x128_1::Vehicles);
     $this->addCardElement($this->logo);
     $this->title = new Label(46);
     $this->title->setPosition(22, -41, 0.1);
     $this->title->setStyle(Label::TextTitle1);
     $this->title->setScriptEvents();
     $this->addCardElement($this->title);
     $this->subTitle = new Label(46);
     $this->subTitle->setPosition(22, -47.75, 0.1);
     $this->subTitle->setStyle(Label::TextSubTitle1);
     $this->addCardElement($this->subTitle);
     $this->quitButton = new Button();
     $this->quitButton->setPosition(-1, -163.5, 0.1);
     $this->quitButton->text->setText('Back');
     $this->quitButton->text->setStyle(Label::TextButtonNavBack);
     $this->quitButton->icon->setPosition(-8.5, -0.5, 0.1);
     $this->quitButton->icon->setStyle(Quad::Icons128x128_1);
     $this->quitButton->icon->setSubStyle(Icons128x128_1::BackFocusable);
     $this->quitButton->icon->setSize(11, 11);
 }
예제 #3
0
 function __construct($sizeX = 90, $sizeY = 8)
 {
     parent::__construct($sizeX, $sizeY);
     $this->setSubStyle(Bgs1::BgCardChallenge);
     $this->name = new Label(85);
     $this->name->setValign('center2');
     $this->name->setPosition(5, -4, 0.1);
     $this->addCardElement($this->name);
     $this->deleteIcon = new Icons64x64_1();
     $this->deleteIcon->setSubStyle(Icons64x64_1::Close);
     $this->deleteIcon->setAlign('right', 'center');
     $this->deleteIcon->setPosition($sizeX - 3, -$sizeY / 2);
     $this->addCardElement($this->deleteIcon);
 }
예제 #4
0
 function __construct($sizeX = 69, $sizeY = 8.5)
 {
     parent::__construct($sizeX, $sizeY);
     $this->setSubStyle(\ManiaLib\Gui\Elements\Bgs1::BgEmpty);
     $this->cardElementsValign = 'center2';
     $this->text = new \ManiaLib\Gui\Elements\Label(45);
     $this->text->setSizeY(0);
     $this->text->setValign("center");
     $this->text->setPosition(8);
     $this->text->setStyle(\ManiaLib\Gui\Elements\Label::TextButtonNav);
     $this->addCardElement($this->text);
     $this->icon = new \ManiaLib\Gui\Elements\Icons128x128_1($this->sizeY);
     $this->icon->setValign("center");
     $this->icon->setPosition(55, 0, 0.1);
     $this->addCardElement($this->icon);
 }
예제 #5
0
 function onDraw()
 {
     switch ($this->state) {
         case static::STATE_READY:
             $subStyle = '0F0D';
             break;
         case static::STATE_IN_MATCH:
             $subStyle = 'FF0D';
             break;
         case static::STATE_BLOCKED:
             $subStyle = '000D';
             break;
         case static::STATE_NOT_READY:
             $subStyle = 'F00D';
             break;
         default:
             $subStyle = '';
     }
     $this->icon->setSize(1, $this->sizeY);
     $this->icon->setPosition(0, -$this->sizeY / 2);
     $this->label->setPosition(8, -$this->sizeY / 2);
     $this->echelonFrame->setPosition($this->sizeX - 1, 0.5);
     $this->countryFlag->setPosition(2, -$this->sizeY / 2);
     $this->bg->setSize($this->sizeX, $this->sizeY);
     $this->hiddenLabel->setText($this->login);
     $echelon = PlayerInfo::ComputeEchelon($this->ladderPoints);
     $this->icon->setBgcolor($subStyle);
     $this->countryFlag->setImage($this->zoneFlagURL, true);
     $this->echelonLabel->setText($echelon);
     $this->echelonQuad->setImage(sprintf('file://Media/Manialinks/Common/Echelons/echelon%d.dds', $echelon), true);
 }
예제 #6
0
 function __construct()
 {
     $this->setTitle('Memory Graph');
     $this->memoryLimit = intval(str_replace('M', 1024 * 1024, ini_get('memory_limit')));
     if ($this->memoryLimit == -1) {
         $this->memoryLimit = Profiler::MEM_DEFAULT;
     }
     $this->barsFrame = new Frame();
     $this->barsFrame->setLayout(new Line());
     $this->addComponent($this->barsFrame);
     $this->linesFrame = new Frame();
     $this->addComponent($this->linesFrame);
     $heightStep = ($this->sizeY - 6) / 4;
     for ($i = 1; $i <= 4; ++$i) {
         $ui = new Frame();
         $ui->setPosition(0, $i * $heightStep);
         $line = new Quad();
         $line->setBgcolor('fff');
         $line->setSize($this->sizeX - 2, 0.2);
         $ui->addComponent($line);
         $text = new Label();
         $text->setText('$fff0% of total');
         $text->setPosition(3, 3.5);
         $ui->addComponent($text);
         $this->linesFrame->addComponent($ui);
         $this->lines[] = array($line, $text, $ui);
     }
     Dispatcher::register(MonitorEvent::getClass(), $this, MonitorEvent::ON_NEW_MEMORY_VALUE);
 }
 function __construct()
 {
     $this->setTitle('Speed Graph');
     $this->barsFrame = new Frame(1, 1 - $this->sizeY, new Line());
     $this->addComponent($this->barsFrame);
     $this->criticalLineFrame = new Frame(0, 1 + self::RESPONSE_MINIMAL * ($this->sizeY - 6) / self::RESPONSE_OPTIMAL - $this->sizeY);
     $text = new Label(75, 3);
     $text->setTextColor('fff');
     $text->setText('Critical Response Time (1/' . self::RESPONSE_MINIMAL . ' Second)');
     $text->setPosition(3, 3.5);
     $text->setTextSize(2);
     $this->criticalLineFrame->addComponent($text);
     $this->criticalLine = new Quad($this->sizeX - 2, 0.2);
     $this->criticalLine->setBgcolor('a00');
     $this->criticalLine->setPosX(1);
     $this->criticalLine->setValign('center');
     $this->criticalLineFrame->addComponent($this->criticalLine);
     $this->addComponent($this->criticalLineFrame);
     $this->optimalLineFrame = new Frame(0, -5);
     $text = new Label(75, 3);
     $text->setTextColor('fff');
     $text->setText('Optimal Response Time (1/' . self::RESPONSE_OPTIMAL . ' Second)');
     $text->setPosition(3, 3.5);
     $text->setTextSize(2);
     $this->optimalLineFrame->addComponent($text);
     $this->optimalLine = new Quad($this->sizeX - 2, 0.2);
     $this->optimalLine->setBgcolor('0a0');
     $this->optimalLine->setPosX(1);
     $this->optimalLine->setValign('bottom');
     $this->optimalLineFrame->addComponent($this->optimalLine);
     $this->addComponent($this->optimalLineFrame);
     Dispatcher::register(MonitorEvent::getClass(), $this, MonitorEvent::ON_NEW_CPU_VALUE);
 }
예제 #8
0
 function __construct()
 {
     $this->setTitle('Network Graph');
     $this->barsFrame = new Frame();
     $this->barsFrame->setLayout(new Line());
     $this->addComponent($this->barsFrame);
     $this->linesFrame = new Frame();
     $this->addComponent($this->linesFrame);
     $heightStep = ($this->sizeY - 6) / 4;
     for ($i = 1; $i <= 4; ++$i) {
         $ui = new Frame();
         $ui->setPosition(0, $i * $heightStep);
         $line = new Quad();
         $line->setBgcolor('fff');
         $line->setSize($this->sizeX - 2, 0.2);
         $ui->addComponent($line);
         $text = new Label();
         $text->setText('$fff0 kb/s');
         $text->setPosition(3, 3.5);
         $ui->addComponent($text);
         $this->linesFrame->addComponent($ui);
         $this->lines[] = array($line, $text, $ui);
     }
     Dispatcher::register(MonitorEvent::getClass(), $this, MonitorEvent::ON_NEW_NETWORK_VALUE);
 }
예제 #9
0
 function __construct($sizeX = 125, $sizeY = 16)
 {
     parent::__construct($sizeX, $sizeY);
     $this->cardElementsValign = 'center';
     $this->bg = new \ManiaLib\Gui\Elements\Quad($sizeX, 8);
     $this->bg->setValign('center');
     $this->bg->setSubStyle(\ManiaLib\Gui\Elements\Bgs1::BgList);
     $this->addCardElement($this->bg);
     $this->bullet = new \ManiaLib\Gui\Elements\Quad(15, 15);
     $this->bullet->setValign('center');
     $this->bullet->setPosition(0.5, -0.1, 1);
     $this->addCardElement($this->bullet);
     $this->title = new \ManiaLib\Gui\Elements\Label();
     $this->title->setValign('center');
     $this->title->setPosition(10, 0.1, 1);
     $this->title->setStyle(\ManiaLib\Gui\Elements\Label::TextTitle3);
     $this->addCardElement($this->title);
 }
예제 #10
0
 function display()
 {
     $ui = new \ManiaLib\Gui\Cards\Navigation\Menu();
     $ui->title->setText(\ManiaHost\Config::getInstance()->appName);
     $ui->subTitle->setText('Powered by ManiaHost');
     $manialink = $this->request->createLinkArgList('../');
     $ui->quitButton->text->setText('Back');
     $ui->quitButton->setManialink($manialink);
     $ui->save();
     $ui = new \ManiaLib\Gui\Cards\Panel(90, 70);
     $ui->title->setText('Duration');
     $ui->titleBg->setSubStyle(Bgs1::BgTitle3_5);
     $ui->setPosX(-5);
     $ui->setValign('center');
     $ui->save();
     Manialink::beginFrame(40, 7, 0.1);
     $ui = new Label(85);
     $ui->setHalign('center');
     $ui->setStyle(Label::TextTips);
     $ui->enableAutonewline();
     $ui->setText('How long do you want to rent server?');
     $ui->save();
     $ui = new Label(25);
     $ui->setAlign('right', 'bottom');
     $ui->setStyle(Label::TextInfoSmall);
     $ui->setPosition(-2, -14);
     $ui->setText('Days');
     $ui->save();
     $ui = new Entry(10, 4.5);
     $ui->setValign('bottom');
     $ui->setPosition(2, -14);
     $ui->setName('days');
     $ui->save();
     $this->request->set('days', 'days');
     $ui = new Label(25);
     $ui->setAlign('right', 'bottom');
     $ui->setStyle(Label::TextInfoSmall);
     $ui->setPosition(-2, -23);
     $ui->setText('Hours');
     $ui->save();
     $ui = new Entry(10, 4.5);
     $ui->setValign('bottom');
     $ui->setPosition(2, -23);
     $ui->setName('hours');
     $ui->save();
     $this->request->set('hours', 'hours');
     $manialink = $this->request->createLink('../rent-server/');
     $ui = new Button();
     $ui->setHalign('center');
     $ui->setPosY(-30);
     $ui->setStyle(Button::CardButtonMediumWide);
     $ui->setText('Go to configuration');
     $ui->setManialink($manialink);
     $ui->save();
     Manialink::endFrame();
 }
예제 #11
0
 function onConstruct()
 {
     parent::onConstruct();
     $ui = new Elements\Quad(static::SIZE_X, static::SIZE_Y);
     $ui->setImage('http://static.maniaplanet.com/manialinks/lobbies/2013-07-26/limited-games-bg.png', true);
     $ui->setAlign('center', 'center');
     $ui->setPosZ(-0.1);
     $this->addComponent($ui);
     $ui = new Elements\Label(static::SIZE_X - 40, 10);
     $ui->setStyle(Elements\Label::TextRaceMessage);
     $ui->setTextPrefix('$i$o');
     $ui->setOpacity(0.8);
     $ui->setTextSize(2);
     $ui->setAlign('center', 'top');
     $ui->setPosition(0, 5);
     $ui->setTextid('demoReady');
     $ui->enableAutonewline();
     $this->frameContent->addComponent($ui);
     $ui = new Elements\Spacer(0, 10);
     $this->frameContent->addComponent($ui);
     $ui = new Elements\Label(static::SIZE_X - 40, 10);
     $ui->setStyle(Elements\Label::TextRaceMessage);
     $ui->setTextPrefix('$i$o');
     $ui->setOpacity(0.5);
     $ui->setTextSize(2);
     $ui->setAlign('center', 'top');
     $ui->setPosition(0, 5);
     $ui->setTextid('demoReady2');
     $ui->enableAutonewline();
     $ui->setTextEmboss();
     $this->frameContent->addComponent($ui);
     $this->yesButton = new \ManiaLivePlugins\MatchMakingLobby\Controls\ButtonImage(50, 10);
     $this->yesButton->setPosition(-30, -5);
     $this->yesButton->bg->setImage('http://static.maniaplanet.com/manialinks/lobbies/2013-07-26/large-button-GREEN-OFF.png', true);
     $this->yesButton->bg->setImageFocus('http://static.maniaplanet.com/manialinks/lobbies/2013-07-26/large-button-GREEN-ON.png', true);
     $this->yesButton->text->setTextid('ok');
     $this->addComponent($this->yesButton);
     $this->noButton = new \ManiaLivePlugins\MatchMakingLobby\Controls\ButtonImage(50, 10);
     $this->noButton->setPosition(30, -5);
     $this->noButton->bg->setImage('http://static.maniaplanet.com/manialinks/lobbies/2013-07-26/large-button-RED-OFF.png', true);
     $this->noButton->bg->setImageFocus('http://static.maniaplanet.com/manialinks/lobbies/2013-07-26/large-button-RED-ON.png', true);
     $this->noButton->text->setTextid('cancel');
     $this->addComponent($this->noButton);
     $this->frameContent->addComponent(new Elements\Spacer(0, 14));
     $ui = new Elements\Label(static::SIZE_X - 10, 10);
     $ui->setStyle(Elements\Label::TextRaceMessage);
     $ui->setTextSize(2);
     $ui->setAlign('center', 'top');
     $ui->setTextid('demoReadyTips');
     $ui->setTextPrefix('$i');
     $ui->setOpacity(0.6);
     $ui->enableAutonewline();
     $this->frameContent->addComponent($ui);
 }
예제 #12
0
 function __construct($sizeX = 200, $sizeY = 15)
 {
     parent::__construct($sizeX, $sizeY);
     $this->setSubStyle('BgCardOnline');
     $this->login = new Label(120);
     $this->login->setValign('bottom');
     $this->login->setPosition(5, -13, 0.1);
     $this->addCardElement($this->login);
     $this->name = new Label(180);
     $this->name->setPosition(5, -2, 0.1);
     $this->addCardElement($this->name);
     $this->remainingTime = new Label(60);
     $this->remainingTime->setHalign('right');
     $this->remainingTime->setValign('bottom');
     $this->remainingTime->setPosition(195, -13, 0.1);
     $this->addCardElement($this->remainingTime);
     $this->renew = new Label(60);
     $this->renew->setHalign('right');
     $this->renew->setPosition(195, -2, 0.1);
     $this->addCardElement($this->renew);
 }
예제 #13
0
 function onConstruct()
 {
     parent::onConstruct();
     $ui = new Elements\Quad(static::SIZE_X, static::SIZE_Y);
     $ui->setImage('http://static.maniaplanet.com/manialinks/lobbies/2013-07-26/limited-games-bg.png', true);
     $ui->setAlign('center', 'center');
     $ui->setPosZ(-0.1);
     $this->addComponent($ui);
     $ui = new Elements\Label(static::SIZE_X - 10, 15);
     $ui->setStyle(Elements\Label::TextRaceMessage);
     $ui->setTextPrefix('$i$o');
     $ui->setOpacity(0.8);
     $ui->setPosition(0, 5);
     $ui->setTextSize(2);
     $ui->setAlign('center', 'top');
     $ui->setTextid('noPlanet');
     $ui->enableAutonewline();
     $this->frameContent->addComponent($ui);
     $this->yesButton = new \ManiaLivePlugins\MatchMakingLobby\Controls\ButtonImage(100, 10);
     $this->yesButton->setPosition(0, 6);
     $this->yesButton->bg->setImage('http://static.maniaplanet.com/manialinks/lobbies/2013-07-26/large-button-GREEN-OFF.png', true);
     $this->yesButton->bg->setImageFocus('http://static.maniaplanet.com/manialinks/lobbies/2013-07-26/large-button-GREEN-ON.png', true);
     $this->yesButton->bg->setUrl('http://fr-maniaplanet.gamesplanet.com/eshop/maniaplanet/shootmania-storm-3202.html?affiliate=EliteLobby');
     $this->yesButton->text->setTextid('noPlanetBuy');
     $this->addComponent($this->yesButton);
     $this->noButton = new \ManiaLivePlugins\MatchMakingLobby\Controls\ButtonImage(100, 10);
     $this->noButton->setPosition(0, -6);
     $this->noButton->bg->setImage('http://static.maniaplanet.com/manialinks/lobbies/2013-07-26/large-button-RED-OFF.png', true);
     $this->noButton->bg->setImageFocus('http://static.maniaplanet.com/manialinks/lobbies/2013-07-26/large-button-RED-ON.png', true);
     $this->noButton->bg->setAction('maniaplanet:quitserver');
     $this->noButton->text->setTextid('noPlanetBye');
     $this->addComponent($this->noButton);
     $this->frameContent->addComponent(new Elements\Spacer(0, 25));
     $ui = new Elements\Label(static::SIZE_X - 10);
     $ui->setStyle(Elements\Label::TextRaceMessage);
     $ui->setTextSize(2);
     $ui->setAlign('center', 'top');
     $ui->setTextid('noPlanetThanks');
     $ui->setOpacity(0.8);
     $ui->setTextPrefix('$i$o');
     $ui->enableAutonewline();
     $this->frameContent->addComponent($ui);
     $ui = new Elements\Label(static::SIZE_X - 10, 15);
     $ui->setStyle(Elements\Label::TextRaceMessage);
     $ui->setTextSize(2);
     $ui->setAlign('center', 'top');
     $ui->setTextid('noPlanetTips');
     $ui->setTextPrefix('$i');
     $ui->setOpacity(0.6);
     $ui->enableAutonewline();
     $this->frameContent->addComponent($ui);
 }
예제 #14
0
 protected function onConstruct()
 {
     $this->setLayer(\ManiaLive\Gui\Window::LAYER_CUT_SCENE);
     $this->setSize(self::SIZE_X, self::SIZE_Y);
     $this->setAlign('right', 'center');
     //162
     $this->setPosition(163, 0, 15);
     $this->bg = new Elements\Quad(self::SIZE_X, self::SIZE_Y);
     $this->bg->setImage('file://Media/Manialinks/Common/Lobbies/side-frame.png', true);
     $this->addComponent($this->bg);
     $this->title = new Elements\Label(self::SIZE_X);
     $this->title->setAlign('center');
     $this->title->setPosition(self::SIZE_X / 2, -4.5);
     $this->title->setStyle(Elements\Label::TextRaceMessage);
     $this->title->setOpacity(0.9);
     $this->title->setTextid('title');
     $this->addComponent($this->title);
     $this->alliesHelp = new Elements\Label(self::SIZE_X - 6);
     $this->alliesHelp->setAlign('center', 'bottom');
     $this->alliesHelp->setPosition(self::SIZE_X / 2, -13);
     $this->alliesHelp->setStyle(Elements\Label::TextTips);
     $this->alliesHelp->setTextid('help');
     $this->alliesHelp->setTextSize(1);
     $this->alliesHelp->setOpacity(0.75);
     $this->addComponent($this->alliesHelp);
     $this->pager = new \ManiaLive\Gui\Controls\Pager();
     $this->pager->setPosition(2.2, -15);
     $this->pager->setSize(40, 110);
     $this->pager->pageNavigatorFrame->setPosition(5, 5);
     $this->pager->label->setTextColor('fff');
     $this->addComponent($this->pager);
     $ui = new Elements\Entry();
     $ui->setName('allyLogin');
     $ui->setId('allyLogin_entry');
     $ui->setHidden(true);
     $this->addComponent($ui);
     $this->dictionnary['title'] = 'players';
     $this->dictionnary['help'] = 'alliesHelp';
 }
예제 #15
0
 function __construct($name = '', $sizeX = 30, $sizeY = 6)
 {
     $this->sizeX = $sizeX;
     $this->sizeY = $sizeY;
     $this->background = new Bgs1($sizeX, $sizeY);
     $this->background->setSubStyle(Bgs1::NavButtonBlink);
     $this->addComponent($this->background);
     $label = new Label();
     $label->setStyle(Label::TextCardSmallScores2Rank);
     $label->setAlign('left', 'center2');
     $label->setPosition(1, -$sizeY / 2);
     $label->setText('$i' . $name);
     $this->addComponent($label);
 }
예제 #16
0
 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);
 }
예제 #17
0
 protected function onConstruct()
 {
     $bullet = ' $<$ff0$o>$> ';
     $ui = new LegacyLabel(300);
     $ui->setPosition(0, -55);
     $ui->setStyle(LegacyLabel::TextRaceMessageBig);
     $ui->setTextSize(5);
     $ui->setHalign('center');
     $ui->setId('help-label');
     $ui->setTextid('switch');
     $this->addComponent($ui);
     $frame = new Frame();
     $frame->setId('help-frame');
     $ui = new Bgs1(340, 60);
     $ui->setPosition(-170, 0, -0.1);
     $ui->setSubStyle(Bgs1::BgDialogBlur);
     $frame->addComponent($ui);
     $this->textLabel = new LegacyLabel(200);
     $this->textLabel->setPosition(-140, -10);
     $this->textLabel->setStyle(LegacyLabel::TextRaceMessageBig);
     $this->textLabel->setTextSize(5);
     $this->textLabel->enableAutonewline();
     $this->textLabel->setId('help-label');
     $this->textLabel->setTextid('help');
     $frame->addComponent($this->textLabel);
     $allies = new Frame(80, 60);
     $allies->setPosition(100, -2);
     $ui = new LegacyLabel(70);
     $ui->setRelativeAlign('center');
     $ui->setAlign('center');
     $ui->setPosition(0, -3, 0.1);
     $ui->setTextid('tip');
     $ui->setStyle(LegacyLabel::TextTitle3);
     $allies->addComponent($ui);
     $ui = new \ManiaLib\Gui\Elements\Quad(70, 39);
     $ui->setRelativeAlign('center');
     $ui->setAlign('center');
     $ui->setPosition(0, -9, 0.1);
     $ui->setImage('http://static.maniaplanet.com/manialinks/lobbies/set-as-ally.bik', true);
     $allies->addComponent($ui);
     $ui = new LegacyLabel(70);
     $ui->setRelativeAlign('center');
     $ui->setAlign('center');
     $ui->setPosition(0, -50, 0.1);
     $ui->setTextColor('fff');
     $ui->setTextid('note');
     $allies->addComponent($ui);
     $frame->addComponent($allies);
     $this->addComponent($frame);
 }
예제 #18
0
 protected function onConstruct()
 {
     $this->setLayer(\ManiaLive\Gui\Window::LAYER_CUT_SCENE);
     $this->setSize(self::SIZE_X, self::SIZE_Y);
     $this->setRelativeAlign('center', 'top');
     $this->setPosition(0, 84);
     $this->bg = new Elements\Quad(self::SIZE_X, self::SIZE_Y);
     $this->bg->setImage('file://Media/Manialinks/Common/Lobbies/header.png');
     $this->bg->setAlign('center');
     $this->addComponent($this->bg);
     $this->serverNameLabel = new Elements\Label(self::SIZE_X - 7);
     $this->serverNameLabel->setStyle(Elements\Label::TextRaceMessage);
     $this->serverNameLabel->setAlign('center', 'top');
     $this->serverNameLabel->setPosition(0, -4);
     $this->serverNameLabel->setTextSize(3);
     $this->addComponent($this->serverNameLabel);
     $this->avgWaitingTimeLabel = new Elements\Label(self::SIZE_X / 3);
     $this->avgWaitingTimeLabel->setAlign('right', 'center');
     $this->avgWaitingTimeLabel->setStyle(Elements\Label::TextRaceMessage);
     $this->avgWaitingTimeLabel->setPosition(self::SIZE_X / 2 - 5, -16);
     $this->avgWaitingTimeLabel->setTextId('avgWaiting');
     $this->avgWaitingTimeLabel->setTextSize(2);
     $this->avgWaitingTimeLabel->setOpacity(0.75);
     $this->addComponent($this->avgWaitingTimeLabel);
     $this->avgWaitingTimeHelperLabel = new Elements\Label(self::SIZE_X / 2);
     $this->avgWaitingTimeHelperLabel->setAlign('right', 'top');
     $this->avgWaitingTimeHelperLabel->setStyle(Elements\Label::TextRaceMessage);
     $this->avgWaitingTimeHelperLabel->setPosition($this->avgWaitingTimeLabel->getPosX(), -18);
     $this->avgWaitingTimeHelperLabel->setTextId('avgWaitingHelper');
     $this->avgWaitingTimeHelperLabel->setScale(0.5);
     $this->avgWaitingTimeHelperLabel->setOpacity(0.5);
     $this->addComponent($this->avgWaitingTimeHelperLabel);
     $this->playerCountLabel = new Elements\Label(self::SIZE_X / 3);
     $this->playerCountLabel->setAlign('left', 'center');
     $this->playerCountLabel->setStyle(Elements\Label::TextRaceMessage);
     $this->playerCountLabel->setPosition(-self::SIZE_X / 2 + 5, -16);
     $this->playerCountLabel->setOpacity(0.75);
     $this->playerCountLabel->setTextSize(2);
     $this->playerCountLabel->setTextid('nPlayers');
     $this->addComponent($this->playerCountLabel);
     $this->playerCountHelperLabel = new Elements\Label(self::SIZE_X / 2);
     $this->playerCountHelperLabel->setAlign('left', 'top');
     $this->playerCountHelperLabel->setStyle(Elements\Label::TextRaceMessage);
     $this->playerCountHelperLabel->setPosition($this->playerCountLabel->getPosX(), -18);
     $this->playerCountHelperLabel->setTextId('nPlayersHelper');
     $this->playerCountHelperLabel->setScale(0.5);
     $this->playerCountHelperLabel->setOpacity(0.5);
     $this->addComponent($this->playerCountHelperLabel);
 }
예제 #19
0
 function __construct($modeName, $subStyle)
 {
     $this->setSize(20, 20);
     $this->background = new Bgs1InRace(20, 20);
     $this->addComponent($this->background);
     $ui = new Label(20);
     $ui->setText($modeName);
     $ui->setPosition(10, -1);
     $ui->setHalign('center');
     $this->addComponent($ui);
     $ui = new Icons128x32_1(13);
     $ui->setAlign('center', 'center');
     $ui->setPosition(10, -13);
     $ui->setSubStyle($subStyle);
     $this->addComponent($ui);
 }
예제 #20
0
 public function display()
 {
     $manialink = $this->request->createLink('/rent/');
     $ui = new \ManiaLib\Gui\Cards\Navigation\Menu();
     $ui->title->setText(\ManiaHost\Config::getInstance()->appName);
     $ui->quitButton->setManialink($manialink);
     $ui->subTitle->setText('Admin panel');
     $manialink = $this->request->createLink('/admin/');
     $ui->addItem();
     $ui->lastItem->text->setText('Incomes');
     $ui->lastItem->icon->setSubStyle(Icons128x128_1::Coppers);
     $ui->lastItem->setManialink($manialink);
     $ui->addItem();
     $ui->lastItem->text->setText('Servers Audience');
     $ui->lastItem->icon->setSubStyle(Icons128x128_1::Statistics);
     $ui->lastItem->setSelected();
     $ui->save();
     Manialink::beginFrame(32, 40);
     $ui = new Panel(100, 90);
     $ui->setHalign('center');
     +$ui->title->setText('Server list');
     $ui->save();
     $ui = new Label(100);
     $ui->setHalign('center');
     $ui->setPosition(0, -23, 0.1);
     $ui->setStyle(Label::TextTips);
     $ui->setText('Choose a server');
     $ui->save();
     $layout = new \ManiaLib\Gui\Layouts\VerticalFlow(30, 50);
     Manialink::beginFrame(-40, -30, 0.1, 1, $layout);
     foreach ($this->response->servers as $server) {
         $this->request->set('serverLogin', $server);
         $manialink = $this->request->createLink('../server-audience/');
         $this->request->restore('serverLogin');
         $ui = new Label(30, 7);
         $ui->setText($server);
         $ui->setStyle(Label::TextCardMedium);
         $ui->setManialink($manialink);
         $ui->save();
     }
     Manialink::endFrame();
     $ui = $this->response->multipage;
     $ui->pageNavigator->setPosition(0, -85, 0.1);
     $ui->savePageNavigator();
     Manialink::endFrame();
 }
예제 #21
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();
 }
예제 #22
0
 function __construct($name = '', $sizeX = 30, $sizeY = 6)
 {
     $this->sizeX = $sizeX;
     $this->sizeY = $sizeY;
     $this->container = new Frame(-$sizeX, 0, new Column(0, 0, Column::DIRECTION_DOWN));
     $this->container->setVisibility(false);
     $this->addComponent($this->container);
     $this->background = new Bgs1();
     $this->background->setSize($sizeX, $sizeY);
     $this->background->setSubStyle(Bgs1::NavButton);
     $this->addComponent($this->background);
     $this->icon = new Icons128x128_1();
     $this->icon->setVisibility(false);
     $this->icon->setValign('center');
     $this->icon->setPosition(0.3, -$sizeY / 2);
     $this->addComponent($this->icon);
     $label = new Label();
     $label->setStyle(Label::TextCardSmallScores2Rank);
     $label->setAlign('right', 'center2');
     $label->setPosition($sizeX - 2, -$sizeY / 2);
     $label->setText($name);
     $this->addComponent($label);
 }
예제 #23
0
파일: Error.php 프로젝트: kremsy/manialib
 function display()
 {
     Manialink::load();
     $ui = new Panel($this->width, $this->height);
     $ui->setAlign('center', 'center');
     $ui->title->setStyle(Label::TextTitleError);
     $ui->titleBg->setSubStyle(Bgs1::BgTitle2);
     $ui->title->setText('Error');
     $ui->save();
     $ui = new Label($this->width - 4);
     $ui->enableAutonewline();
     $ui->setAlign('center', 'center');
     $ui->setPosition(0, -5, 1);
     $ui->setText($this->message);
     $ui->save();
     $ui = new Button();
     $ui->setText($this->response->errorButtonMessage ?: 'Back');
     $ui->setManiazone($this->response->errorManialink ?: $this->response->backLink);
     $ui->setPosition(0, -($this->height / 2) + 12, 1);
     $ui->setHalign('center');
     $ui->save();
     Manialink::render();
 }
예제 #24
0
$ui = new \ManiaLib\Gui\Elements\BgRaceScore2(13, 13);
$ui->setPosition(25, 1.75, 0.1);
$ui->setSubStyle(\ManiaLib\Gui\Elements\BgRaceScore2::Speaking);
$ui->save();
Manialink::endFrame();
$ui = new Label(190);
$ui->setPosition(0, -12);
$ui->enableAutonewline();
$ui->setMaxline(21);
$ui->setTextColor('000');
$ui->setTextSize(2);
$ui->setText(maniapress_html_filter(get_the_content()));
$ui->save();
$ui = new \ManiaLib\Gui\Elements\Button();
$ui->setHalign('center');
$ui->setPosition(95, -105, 0.1);
$ui->setStyle(\ManiaLib\Gui\Elements\Button::CardButtonSmallWide);
$ui->setUrl(ManiaLib\Utils\URI::getCurrent());
$ui->setText('Read the full post on the Web');
$ui->save();
$categories = maniapress_get_categories(get_the_ID());
$tags = maniapress_get_tags(get_the_ID());
$metadata = sprintf('This entry was written by %s, posted on %s at %s, filed under %s and tagged %s.', get_the_author(), the_date('', '', '', false), get_the_time(), $categories, $tags);
$ui = new Label(190 / 1.25);
$ui->setScale(1.25);
$ui->setPosition(0, -115, 0);
$ui->setStyle(Label::TextButtonSmall);
$ui->setText($metadata);
$ui->enableAutonewline();
$ui->save();
Manialink::endFrame();
예제 #25
0
use ManiaLib\Gui\Manialink;
use ManiaLib\Gui\Elements\Label;
get_header();
if (have_posts()) {
    $layout = new \ManiaLib\Gui\Layouts\Column();
    $layout->setMarginHeight(1);
    Manialink::beginFrame(-95, 50, 0.2, 1, $layout);
    while (have_posts()) {
        the_post();
        get_template_part('content', get_post_format());
    }
    Manialink::endFrame();
    $next = maniapress_html_decode(\ManiaLib\Utils\Arrays::get(explode('"', get_next_posts_link()), 1));
    $prev = maniapress_html_decode(\ManiaLib\Utils\Arrays::get(explode('"', get_previous_posts_link()), 1));
    $ui = new ManiaLib\Gui\Cards\PageNavigator();
    $ui->setPosition(0, -75, 0);
    $ui->arrowNext->setManialink($next);
    $ui->arrowPrev->setManialink($prev);
    $ui->save();
} else {
    $ui = new Label(120 / 1.5);
    $ui->setScale(1.5);
    $ui->setHalign('center');
    $ui->setPosition(0, 40, 0.2);
    $ui->enableAutonewline();
    $ui->setStyle(Label::TextButtonSmall);
    $ui->setText('Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.');
    $ui->save();
}
get_sidebar();
get_footer();
 function onConstruct()
 {
     $this->setLayer(\ManiaLive\Gui\Window::LAYER_CUT_SCENE);
     $this->dico = array('playing' => 'playing', 'rules' => 'rules', 'ready' => 'ready', 'invite' => 'invite', 'readyButton' => 'readyButton', 'players' => 'players', 'allies' => 'party', 'avgWaiting' => 'waitingScreenWaitingLabel', 'rules' => 'rules', 'back' => 'quit');
     //		$ui = new Elements\Quad(320, 20);
     //		$ui->setAlign('center', 'bottom');
     //		$ui->setBgcolor('000');
     //		$ui->setPosition(0,-90);
     //		$this->addComponent($ui);
     $ui = new Elements\Quad(self::SIZE_X, self::SIZE_Y);
     $ui->setAlign('center', 'center');
     $ui->setImage('http://static.maniaplanet.com/manialinks/lobbies/2013-08-23/main-bg.png', true);
     $this->addComponent($ui);
     $ui = new Elements\Label(self::SIZE_X);
     $ui->setAlign('center', 'top');
     $ui->setPosition(0, 38);
     $ui->setTextColor('fff');
     $ui->setScale(0.9);
     $ui->setTextSize(2.5);
     $ui->enableAutonewline();
     $ui->setTextid('text');
     $ui->setOpacity(0.9);
     $this->addComponent($ui);
     $frame = new Frame();
     $frame->setScale(0.6);
     $frame->setPosition(0, 20);
     $this->addComponent($frame);
     $this->emptySlot = new \ManiaLivePlugins\MatchMakingLobby\Controls\EmptySlot();
     $this->emptySlot->setSize(80, 20);
     $this->emptySlot->setAlign('center');
     $this->dico[$this->emptySlot->getLabelTextid()] = 'picked';
     $this->playerListFrame = new \ManiaLive\Gui\Controls\Frame(0, 5, new \ManiaLib\Gui\Layouts\Column());
     $this->playerListFrame->getLayout()->setMarginHeight(3);
     $frame->addComponent($this->playerListFrame);
     //quit button start
     $this->quitButtonFrame = new Frame();
     $this->quitButtonFrame->setSize(35, 10);
     $this->quitButtonFrame->setPosition(-47, -36);
     $this->addComponent($this->quitButtonFrame);
     $ui = new Elements\Quad($this->quitButtonFrame->getSizeX(), 10);
     $ui->setAlign('center', 'center');
     $ui->setImage('file://Media/Manialinks/Common/Lobbies/small-button-RED.dds', true);
     $ui->setImageFocus('file://Media/Manialinks/Common/Lobbies/small-button-RED-ON.dds', true);
     $ui->setAction('maniaplanet:quitserver');
     $this->quitButtonFrame->addComponent($ui);
     $ui = new Elements\Label($this->quitButtonFrame->getSizeX());
     $ui->setAlign('center', 'center2');
     $ui->setStyle(Elements\Label::TextRaceMessageBig);
     $ui->setTextid('back');
     $ui->setOpacity(0.8);
     $ui->setTextSize(2);
     $ui->setScale(0.95);
     $this->quitButtonFrame->addComponent($ui);
     //quit button  end
     //learn button start
     if (static::$rulesManialink) {
         $this->learnButtonFrame = new Frame();
         $this->learnButtonFrame->setSize(35, 10);
         $this->learnButtonFrame->setPosition(0, -25);
         $this->addComponent($this->learnButtonFrame);
         $ui = new Elements\Quad($this->learnButtonFrame->getSizeX(), 10);
         $ui->setAlign('center', 'center');
         //			$ui->setImage('file://Media/Manialinks/Common/Lobbies/small-button-YELLOW.dds', true);
         //			$ui->setImageFocus('file://Media/Manialinks/Common/Lobbies/small-button-YELLOW-ON.dds', true);
         $ui->setImage('http://static.maniaplanet.com/manialinks/lobbies/2013-08-23/small-button-YELLOW.dds', true);
         $ui->setImageFocus('http://static.maniaplanet.com/manialinks/lobbies/2013-08-23/small-button-YELLOW-ON.dds', true);
         $ui->setManialink(static::$rulesManialink);
         $this->learnButtonFrame->addComponent($ui);
         $ui = new Elements\Label($this->learnButtonFrame->getSizeX());
         $ui->setAlign('center', 'center2');
         $ui->setStyle(Elements\Label::TextRaceMessageBig);
         $ui->setTextid('rules');
         $ui->setOpacity(0.8);
         $ui->setTextSize(2);
         $ui->setScale(0.95);
         $this->learnButtonFrame->addComponent($ui);
     }
     //learn button  end
     //ready button start
     $this->readyButtonFrame = new Frame();
     $this->readyButtonFrame->setSize(48, 12);
     $this->readyButtonFrame->setPosition(0, -36);
     $this->addComponent($this->readyButtonFrame);
     $this->readyButton = new Elements\Quad(48, $this->readyButtonFrame->getSizeY());
     $this->readyButton->setAlign('center', 'center');
     $this->readyButton->setImage('file://Media/Manialinks/Common/Lobbies/ready-button-GREEN.dds', true);
     $this->readyButton->setImageFocus('file://Media/Manialinks/Common/Lobbies/ready-button-GREEN-ON.dds', true);
     $this->readyButtonFrame->addComponent($this->readyButton);
     $ui = new Elements\Label(48, $this->readyButtonFrame->getSizeY());
     $ui->setAlign('center', 'center2');
     $ui->setStyle(Elements\Label::TextRaceMessageBig);
     $ui->setTextid('readyButton');
     $ui->setOpacity(0.8);
     $ui->setTextSize(2.5);
     $this->readyButtonFrame->addComponent($ui);
     //ready button  end
     //Invite button start
     $this->inviteButtonFrame = new Frame();
     $this->inviteButtonFrame->setSize(35, 10);
     $this->inviteButtonFrame->setPosition(47, -36);
     $this->addComponent($this->inviteButtonFrame);
     $ui = new Elements\Quad($this->inviteButtonFrame->getSizeX(), 10);
     $ui->setAlign('center', 'center');
     $ui->setImage('file://Media/Manialinks/Common/Lobbies/small-button-BLUE.dds', true);
     $ui->setImageFocus('file://Media/Manialinks/Common/Lobbies/small-button-BLUE-ON.dds', true);
     $ui->setManialink(static::$inviteManialink);
     $this->inviteButtonFrame->addComponent($ui);
     $ui = new Elements\Label($this->inviteButtonFrame->getSizeX());
     $ui->setAlign('center', 'center2');
     $ui->setStyle(Elements\Label::TextRaceMessageBig);
     $ui->setTextid('invite');
     $ui->setOpacity(0.8);
     $ui->setTextSize(2);
     $ui->setScale(0.95);
     $this->inviteButtonFrame->addComponent($ui);
     //Invite button end
     $this->logo = new Elements\Quad(80, 20);
     $this->logo->setAlign('center', 'bottom');
     $this->logo->setPosY(-90);
 }
예제 #27
0
 * @copyright   Copyright (c) 2011-2012 NADEO (http://www.nadeo.com)
 * @license     http://www.gnu.org/licenses/lgpl.html LGPL License 3
 * @version     $Revision$:
 * @author      $Author$:
 * @date        $Date$:
 */
use ManiaLib\Gui\Manialink;
use ManiaLib\Gui\Elements\Label;
Manialink::beginFrame(-95, 47, 0.2);
Manialink::setFrameId('post-' . get_the_ID());
$ui = new Label(190);
$ui->setScale(1.5);
$ui->setStyle(Label::TextButtonBig);
$ui->setText('$000' . maniapress_html_filter(the_title('', '', false)));
$ui->save();
$ui = new Label(190);
$ui->setPosition(0, -12);
$ui->enableAutonewline();
$ui->setMaxline(21);
$ui->setTextColor('000');
$ui->setTextSize(2);
$ui->setText(maniapress_html_filter(get_the_content()));
$ui->save();
$ui = new \ManiaLib\Gui\Elements\Button();
$ui->setHalign('center');
$ui->setPosition(95, -120, 0.1);
$ui->setStyle(\ManiaLib\Gui\Elements\Button::CardButtonSmallWide);
$ui->setUrl(ManiaLib\Utils\URI::getCurrent());
$ui->setText('View the full page on the Web');
$ui->save();
Manialink::endFrame();
예제 #28
0
 public function display()
 {
     \ManiaLib\ManiaScript\Main::begin();
     $ui = new \ManiaLib\Gui\Cards\Navigation\Menu();
     $ui->title->setText(\ManiaHost\Config::getInstance()->appName);
     $ui->subTitle->setText('Select maps');
     $manialink = $this->request->createLinkArgList('../default-maps/');
     $ui->addItem();
     $ui->lastItem->text->setText('Default maps');
     $ui->lastItem->icon->setSubStyle(\ManiaLib\Gui\Elements\Icons128x128_1::Browse);
     $ui->lastItem->setManialink($manialink);
     $manialink = $this->request->createLinkArgList('../upload/');
     $ui->addItem(\ManiaLib\Gui\Cards\Navigation\Menu::BUTTONS_BOTTOM);
     $ui->lastItem->text->setText('Upload');
     $ui->lastItem->icon->setSubStyle(\ManiaLib\Gui\Elements\Icons128x128_1::Save);
     $ui->lastItem->setManialink($manialink);
     $manialink = $this->request->createLinkArgList('../select-map/');
     $ui->quitButton->text->setText('Back');
     $ui->quitButton->setManialink($manialink);
     $ui->save();
     Manialink::beginFrame(17, 66, 0.2);
     $ui = new \ManiaLib\Gui\Cards\Panel(94, 20);
     $ui->setHalign('center');
     $ui->title->setText('Maps');
     $ui->save();
     $ui = new Label();
     $ui->setText($this->response->mapCount);
     $ui->setHalign('right');
     $ui->setPosition(43, -7, 0.1);
     $ui->save();
     Manialink::beginFrame(0, -20, 0);
     $ui = new Bgs1(90, 6);
     $ui->setSubStyle(Bgs1::BgList);
     $ui->setHalign('center');
     $ui->save();
     $manialink = $this->request->createLink();
     $ui = new Icons64x64_1(6, 6);
     $ui->setPosition(-45, 0, 0.1);
     $ui->setSubStyle(Icons64x64_1::ToolUp);
     $ui->setManialink($manialink);
     $ui->save();
     $ui = new Icons64x64_1(6, 6);
     $ui->setHalign('right');
     $ui->setPosition(45, 0, 0.1);
     $ui->setSubStyle(Icons64x64_1::Refresh);
     $ui->setManialink($manialink);
     $ui->save();
     $this->request->set('path', $this->response->path);
     $manialink = $this->request->createLink($this->response->selector);
     $this->request->delete('path');
     $ui = new Icons64x64_1(6, 6);
     $ui->setHalign('right');
     $ui->setPosition(39, 0, 0.1);
     $ui->setSubStyle(Icons64x64_1::ToolRoot);
     $ui->setManialink($manialink);
     $ui->save();
     Manialink::endFrame();
     $layout = new \ManiaLib\Gui\Layouts\Column();
     Manialink::beginFrame(-45, -30, 0.1, 1, $layout);
     foreach ($this->response->files as $file) {
         $this->request->set('filename', $file->path . DIRECTORY_SEPARATOR . $file->filename);
         $card = new \ManiaHost\Cards\File();
         if (in_array($file->path . DIRECTORY_SEPARATOR . $file->filename, $this->response->selected)) {
             $manialink = $this->request->createLink('../unselect/');
             $card->setSubStyle(Bgs1::BgCard);
         } else {
             $manialink = $this->request->createLink('../select/');
         }
         $card->setManialink($manialink);
         $card->name->setText($file->name);
         if (!in_array($file->path . $file->filename, $this->response->used)) {
             $manialink = $this->request->createLink('../delete-map');
             $card->deleteIcon->setId('delete');
             $card->deleteIcon->setScriptEvents();
             \ManiaLib\ManiaScript\UI::dialog('delete', 'Dou you want to delete this map ' . $file->name, array(\ManiaLib\ManiaScript\Action::manialink, $manialink));
         } else {
             $card->deleteIcon->setScale(0);
         }
         $card->save();
     }
     Manialink::endFrame();
     $this->response->multipage->pageNavigator->setPosition(0, -135, 0.1);
     $this->response->multipage->savePageNavigator();
     $manialink = $this->request->createLink('../checkout');
     $ui = new \ManiaLib\Gui\Elements\Button();
     $ui->setText('Play');
     $ui->setAlign('center', 'center2');
     $ui->setPosition(100, -136.25);
     $ui->setManialink($manialink);
     $ui->save();
     Manialink::endFrame();
     \ManiaLib\ManiaScript\Main::loop();
     \ManiaLib\ManiaScript\Main::end();
 }
 function __construct()
 {
     $this->setSize(80, 20);
     $ui = new Elements\Quad(80, 20);
     $ui->setImage('http://static.maniaplanet.com/manialinks/elite/PlayerCardBg.dds', true);
     $this->addComponent($ui);
     $this->icon = new Elements\Icons64x64_1(18.5, 18.5);
     $this->icon->setBgcolor('F00');
     $this->icon->setAlign('left', 'center');
     $this->addComponent($this->icon);
     $this->label = new Elements\Label(38);
     $this->label->setPosition(22, -2.5);
     $this->label->setTextSize(3);
     $this->label->setStyle(Elements\Label::TextRaceMessage);
     $this->addComponent($this->label);
     $this->teamLabel = new Elements\Label(25);
     $this->teamLabel->setPosition(27, -11.5);
     $this->teamLabel->setValign('center2');
     $this->teamLabel->setStyle(Elements\Label::TextRaceMessage);
     $this->teamLabel->setTextSize(2);
     $this->teamLabel->setText('$o$09FLorem$z Ipsum Team');
     //		$this->addComponent($this->teamLabel);
     $this->teamIcon = new Elements\Quad(4, 4);
     $this->teamIcon->setValign('center');
     $this->teamIcon->setPosition(22, -11.5);
     $this->teamIcon->setBgcolor('FF0a');
     //		$this->addComponent($this->teamIcon);
     $this->rankLabel = new Elements\Label(30);
     $this->rankLabel->setAlign('left', 'center2');
     $this->rankLabel->setPosition(27, -17.5);
     $this->rankLabel->setText('-');
     $this->rankLabel->setStyle(Elements\Label::TextRaceMessage);
     $this->rankLabel->setTextSize(1);
     $this->addComponent($this->rankLabel);
     $this->countryFlag = new Elements\Quad(4, 4);
     $this->countryFlag->setAlign('left', 'center');
     $this->countryFlag->setPosition(22, -17.5);
     $this->addComponent($this->countryFlag);
     $frame = new \ManiaLive\Gui\Controls\Frame(72, 0);
     $frame->setScale(1.13);
     $frame->setPosZ(0.1);
     $this->addComponent($frame);
     $this->echelonQuad = new Elements\Quad(14.1551, 17.6938);
     $this->echelonQuad->setAlign('center', 'top');
     $frame->addComponent($this->echelonQuad);
     $ui = new Elements\Label(15);
     $ui->setAlign('center', 'top');
     $ui->setStyle(Elements\Label::TextRaceMessage);
     $ui->setPosition(-0.25, -3.6);
     $ui->setTextSize(0.5);
     $ui->setText('Echelon');
     $frame->addComponent($ui);
     $this->echelonLabel = new Elements\Label(10, 10);
     $this->echelonLabel->setAlign('center', 'center');
     $this->echelonLabel->setPosition(-0.25, -10.6);
     $this->echelonLabel->setStyle(Elements\Label::TextRaceMessageBig);
     $frame->addComponent($this->echelonLabel);
     $this->disableQuad = new Elements\Quad(80, 20);
     $this->disableQuad->setBgcolor('333A');
     $this->disableQuad->setVisibility(false);
     $this->disableQuad->setPosZ(3);
     $this->addComponent($this->disableQuad);
 }
    public function display()
    {
        Manialink::load();
        Manialink::appendXML(Dictionary::getInstance()->getManiaLink($this->displayedText));
        Manialink::appendScript(<<<MANIASCRIPT
#RequireContext CMlScript
#Include "MathLib" as MathLib
#Include "TextLib" as TextLib
main()
{
\tdeclare Boolean countdown = True;
\tdeclare Integer countdownTime = CurrentTime;
\tdeclare Integer countdownTimeLeft = 10;
\tdeclare CMlFrame frame  <=> (Page.MainFrame.GetFirstChild("block-quit") as CMlFrame);
\tdeclare CMlLabel label <=> (Page.MainFrame.GetFirstChild("countdown-label") as CMlLabel);
\tlabel.SetText(TextLib::ToText(countdownTimeLeft));

\twhile(True)
\t{
\t\tif(countdown && countdownTimeLeft >= 0 && CurrentTime - countdownTime > 1000)
\t\t{
\t\t\tcountdownTime = CurrentTime;
\t\t\tcountdownTimeLeft = countdownTimeLeft - 1;
\t\t\tlabel.SetText(TextLib::ToText(countdownTimeLeft));
\t\t}
\t\telse if(countdown && countdownTimeLeft <= 0)
\t\t{
\t\t\tframe.Hide();
\t\t}
\t\tyield;
\t}
}
MANIASCRIPT
);
        $frame = new \ManiaLib\Gui\Elements\Frame();
        $frame->setPosition(0, 5, 0);
        $label = new Label(170);
        $label->setAlign('center', 'center2');
        $label->setStyle(Label::TextRaceMessageBig);
        $label->setTextSize(5);
        $label->setTextColor('f00');
        $label->setTextId('text');
        $frame->add($label);
        $iconBlink = new Icons128x128_Blink(15);
        $iconBlink->setAlign('right', 'center');
        $iconBlink->setPosition(-87, 0);
        $iconBlink->setSubStyle(Icons128x128_Blink::Hard);
        $frame->add($iconBlink);
        $iconBlink = new Icons128x128_Blink(15);
        $iconBlink->setAlign('left', 'center');
        $iconBlink->setPosition(87, 0);
        $iconBlink->setSubStyle(Icons128x128_Blink::Hard);
        $frame->add($iconBlink);
        $frame->save();
        $frame = new \ManiaLib\Gui\Elements\Frame();
        $frame->setPosition(0, -6.5, 10);
        $frame->setScriptEvents();
        $frame->setId('block-quit');
        $bg = new Bgs1(180, 45);
        $bg->setSubStyle(Bgs1::BgDialogBlur);
        $bg->setAlign('center');
        $bg->setScriptEvents();
        $bg->setId('background');
        $bg->setManialink('');
        $frame->add($bg);
        $bg = new Quad(180, 45);
        $bg->setBgcolor('0008');
        $bg->setAlign('center');
        $bg->setScriptEvents();
        $frame->add($bg);
        $ui = new Label(120);
        $ui->setAlign('center');
        $ui->setPosition(0, -6, 0.1);
        $ui->setStyle(Label::TextRaceMessageBig);
        $ui->setTextSize(4);
        $ui->setTextid('available');
        $frame->add($ui);
        $ui = new Label(20);
        $ui->setId('countdown-label');
        $ui->setAlign('center');
        $ui->setPosition(0, -15, 0.1);
        $ui->setStyle(Label::TextRaceMessageBig);
        $ui->setTextSize(5);
        $ui->setText('10');
        $frame->add($ui);
        $frame->save();
        return Manialink::render(true);
    }