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); }
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); }
function onDraw() { if ($this->backgroundUrl) { $this->background->setImage($this->backgroundUrl); } if ($this->clickAction) { $this->background->setAction($this->clickAction); } if ($this->closeAction) { $this->button->setAction($this->closeAction); } }
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); }
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); }
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'); $ui->addItem(); $ui->lastItem->text->setText('Incomes'); $ui->lastItem->icon->setSubStyle(Icons128x128_1::Coppers); $ui->lastItem->setSelected(); $manialink = $this->request->createLink('/admin/audience-list/'); $ui->addItem(); $ui->lastItem->text->setText('Servers Audience'); $ui->lastItem->icon->setSubStyle(Icons128x128_1::Statistics); $ui->lastItem->setManialink($manialink); $ui->save(); Manialink::beginFrame(35); $quad = new Quad(180, 60); $quad->setPosY(64); $quad->setHalign('center'); $quad->setImage($this->response->rentalUrl, true); $quad->save(); $quad = new Quad(180, 60); $quad->setPosY(-4); $quad->setHalign('center'); $quad->setImage($this->response->incomesUrl, true); $quad->save(); Manialink::endFrame(); }
function onDraw() { $this->icon->setImage($this->avatarUrl, true); $this->icon->setPosition(0.75, -10); $this->label->setText($this->nickname); $this->rankLabel->setText(sprintf('%s: %d', $this->zone, $this->rank)); $this->countryFlag->setImage($this->countryFlagUrl, true); $this->echelonQuad->setImage(sprintf('file://Media/Manialinks/Common/Echelons/echelon%d.dds', $this->echelon), true); $this->echelonLabel->setText($this->echelon); }
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); }
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'; }
function display() { if (!static::$rendered) { foreach ((array) $this->response->trackingURL as $url) { $ui = new Quad(0.1, 0.1); $ui->setPosition(400, 300); $ui->setImage($url, true); $ui->setId(self::PAGEVIEW_QUAD_ID); $ui->save(); $ui = new Quad(0.1, 0.1); $ui->setPosition(400, 300); $ui->setImage('', true); $ui->setId(self::EVENT_QUAD_ID); $ui->save(); } static::$rendered = true; } }
function display() { parent::display(); $config = \ManiaHost\Config::getInstance(); if (static::$showBackground) { $ui = new Quad(320, 180); $ui->setAlign('center', 'center'); $ui->setImage($config->background, true); $ui->setPosZ(-3); $ui->save(); } $ui = new \ManiaLib\Gui\Elements\IncludeManialink(); $ui->setUrl('manialib.xml', false); $ui->save(); Manialink::beginFrame(110, -81, 0.1); $ui = new \ManiaLib\Gui\Elements\IncludeManialink(); $query = array(); $query['url'] = \ManiaLib\Application\Config::getInstance()->manialink; $query['name'] = $config->appName; $ui->setUrl('http://maniahome.maniaplanet.com/add/?' . http_build_query($query, '', '&')); $ui->save(); Manialink::endFrame(); }
function onDraw() { $this->playerListFrame->destroyComponents(); $playerKeys = array_keys($this->playerList); for ($i = 0; $i < static::$partySize; $i++) { if (array_key_exists($i, $playerKeys)) { $player = $this->playerList[$playerKeys[$i]]; $ui = new PlayerDetailed(); $ui->nickname = $player['nickname']; $ui->zone = $player['zone']; $ui->avatarUrl = $player['avatarUrl']; $ui->rank = $player['rank']; $ui->echelon = $player['echelon']; $ui->countryFlagUrl = $player['countryFlagUrl']; $ui->disable($player['disable']); $ui->setHalign('center'); $this->playerListFrame->addComponent($ui); } else { $this->playerListFrame->addComponent(clone $this->emptySlot); } } if ($this->disableReadyButton) { $this->readyButtonFrame->setVisibility(false); } else { $this->readyButtonFrame->setVisibility(true); $this->readyButton->setAction(static::$readyAction); } $this->posZ = 3.9; if (static::$logoURL) { $this->logo->setImage(static::$logoURL, true); $this->logo->setUrl(static::$logoLink); $this->addComponent($this->logo); } else { $this->removeComponent($this->logo); } $textId = $this->textId ?: array('textId' => 'waitingHelp', 'params' => array(static::$scriptName)); $this->dico['text'] = $textId; \ManiaLive\Gui\Manialinks::appendXML(Dictionary::getInstance()->getManiaLink($this->dico)); }
use ManiaLib\Gui\Elements\Icons128x128_1; use ManiaLib\Gui\Elements\Icons64x64_1; use ManiaLib\Gui\Elements\UIConstructionSimple_Buttons; Manialink::load(); $ui = new \ManiaLib\Gui\Elements\IncludeManialink(); $ui->setUrl('manialib.xml', false); $ui->save(); \ManiaLib\ManiaScript\Main::begin(); $background = maniapress_get_option('theme-background'); $ui = new Quad(320, 180); $ui->setAlign('center', 'center'); if ($background) { if (ctype_xdigit($background) && strlen($background) < 4) { $ui->setBgcolor($background); } else { $ui->setImage($background, true); } } else { $ui->setImage('bg.jpg'); } $ui->save(); $ui = new \ManiaLib\Gui\Elements\Bgs1InRace(202, 200); $ui->setPosition(0, 0, 0.09); $ui->setAlign('center', 'center'); $ui->setSubStyle(\ManiaLib\Gui\Elements\Bgs1InRace::BgTitleShadow); $ui->save(); Manialink::beginFrame(-100, 90, 0.1); $ui = new Quad(200, 28); $ui->setBgcolor(maniapress_get_option('theme-header-bg', 'fff')); $ui->save(); $ui = new \ManiaLib\Gui\Elements\Quad(200, 145);