示例#1
0
 function onConstruct()
 {
     $this->setLayer(\ManiaLive\Gui\Window::LAYER_CUT_SCENE);
     $ui = new Elements\Bgs1(320, 180);
     $ui->setAlign('center', 'center');
     $ui->setSubStyle(Elements\Bgs1::BgDialogBlur);
     $this->addComponent($ui);
     $ui = new Elements\Bgs1(163, 63);
     $ui->setAlign('center', 'center');
     $ui->setSubStyle(Elements\Bgs1::BgShadow);
     $this->addComponent($ui);
     $ui = new Elements\Quad(160, 60);
     $ui->setAlign('center', 'center');
     $ui->setBgcolor('eeef');
     $this->addComponent($ui);
     $this->questionLabel = new Elements\Label(160);
     $this->questionLabel->setAlign('center', 'center2');
     $this->questionLabel->setPosY(5);
     $this->questionLabel->enableAutonewline();
     $this->questionLabel->setStyle(Elements\Label::TextInfoMedium);
     $this->addComponent($this->questionLabel);
     $this->yesButton = new Elements\Button();
     $this->yesButton->setAlign('left', 'bottom');
     $this->yesButton->setPosition(-45, -25);
     $this->yesButton->setTextid('yes');
     $this->addComponent($this->yesButton);
     $this->noButton = new Elements\Button();
     $this->noButton->setAlign('right', 'bottom');
     $this->noButton->setPosition(45, -25);
     $this->noButton->setTextid('no');
     $this->addComponent($this->noButton);
 }
示例#2
0
 protected function onConstruct()
 {
     $this->bg = new \ManiaLib\Gui\Elements\Bgs1(320, 16);
     $this->bg->setSubStyle(\ManiaLib\Gui\Elements\Bgs1::BgDialogBlur);
     $this->bg->setAlign('center', 'center2');
     $this->addComponent($this->bg);
     $this->label = new \ManiaLib\Gui\Elements\Label(240);
     $this->label->setStyle(\ManiaLib\Gui\Elements\Label::TextRaceMessageBig);
     $this->label->setTextSize(4);
     $this->label->setAlign('center', 'center2');
     $this->label->enableAutonewline();
     $this->label->setId('info-label');
     $this->label->setTextid('text');
     $this->addComponent($this->label);
     $this->label2 = new \ManiaLib\Gui\Elements\Label(240);
     $this->label2->setStyle(\ManiaLib\Gui\Elements\Label::TextRaceMessageBig);
     $this->label2->setTextSize(4);
     $this->label2->setAlign('center', 'center2');
     $this->label2->enableAutonewline();
     $this->label2->setTextid('wait');
     $this->label2->setId('wait-label');
     $this->addComponent($this->label2);
     $this->sound = new \ManiaLib\Gui\Elements\Audio();
     $this->sound->setData('http://static.maniaplanet.com/manialinks/lobbies/timer.wav', true);
     $this->sound->setPosition(200);
     $this->sound->autoPlay();
 }
示例#3
0
 function __construct($sizeX = 65, $sizeY = 25)
 {
     parent::__construct($sizeX, $sizeY);
     $this->setSubStyle(\ManiaLib\Gui\Elements\Bgs1::BgWindow2);
     $this->title->setStyle(\ManiaLib\Gui\Elements\Label::TextTitle2);
     $this->addCardElement($this->title);
     $this->button = new \ManiaLib\Gui\Elements\Button();
     $this->button->setAlign('center', 'bottom');
     $this->addCardElement($this->button);
     $this->text = new Label();
     $this->text->setAlign('center', 'center');
     $this->text->enableAutonewline();
     //		$this->text->setStyle(Label::TextStaticMedium);
     $this->addCardElement($this->text);
 }
 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();
 }
 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);
 }
 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);
 }
示例#7
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();
 }
示例#8
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();
 }
$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();
 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);
 }