function onDraw() { \ManiaLive\Gui\Manialinks::appendXML(Dictionary::getInstance()->getManiaLink(array('yes' => 'yes', 'no' => 'no'))); $this->yesButton->setAction($this->yesAction); $this->noButton->setAction($this->noAction); $this->questionLabel->setText($this->questionText); }
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('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); }
function preFilter() { parent::preFilter(); $this->text->setSize($this->sizeX - 6, $this->sizeY - 11); $this->text->setPositionY(-$this->sizeY / 2 - 5); $this->button->setPositionY(5 - $this->sizeY); }
protected function preFilter() { if (!$this->isSelected && $this->text->getText()) { $this->text->setText(self::$unselectedTextStyle . $this->text->getText()); } $this->text->addLink($this); $this->icon->addLink($this); }
function preFilter() { foreach ($this->data as $data) { $ui = new Label($this->sizeX - $this->cardElementsPosX * 2, 6); $ui->setText(self::formatLine(Arrays::get($data, 0, ''), Arrays::get($data, 1, ''))); $this->addCardElement($ui); } $this->setSizeY($this->sizeY + count($this->data) * 6 + 6); }
function preFilter() { $this->panelBg->setStyle($this->getStyle()); $this->panelBg->setSubStyle($this->getSubStyle()); $this->setStyle(null); $this->setSubStyle(null); $this->titleBg->setSizeX($this->sizeX); $this->title->setSizeX($this->sizeX - 6); $this->panelBg->setSize($this->sizeX - 4, $this->sizeY - $this->titleBg->getSizeY() - 4.5); $this->panelBg->setPosY(-$this->titleBg->getSizeY() - 4.5); }
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); }
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 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); }
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); }
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); }
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(); }
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(); }
protected function preFilter() { $this->subTitle->setText('$o$999' . $this->subTitle->getText()); if ($this->showQuitButton) { $this->quitButton->text->setText('$09f' . $this->quitButton->text->getText()); $this->quitButton->text->setPosX($this->quitButton->text->getPosX() - 1); $this->addCardElement($this->quitButton); } }
function onDraw() { $this->setPosZ(3); if (static::$displayAlliesHelp) { $this->title->setPosY(-4.5); $this->alliesHelp->setVisibility(true); } else { $this->title->setPosY(-6); $this->alliesHelp->setVisibility(false); } \ManiaLive\Gui\Manialinks::appendXML(\ManiaLivePlugins\MatchMakingLobby\Utils\Dictionary::getInstance()->getManiaLink($this->dictionnary)); \ManiaLive\Gui\Manialinks::appendScript(<<<EOSCRIPT #RequireContext CMlScript #Include "MathLib" as MathLib #Include "TextLib" as TextLib main() { \tdeclare Text ClickedIndex; \tdeclare Text ButtonIdPrefix; \tdeclare Text DataIdPrefix; \tdeclare Text DataEntryId; \tdeclare Integer ButtonIdPrefixLength; \tdeclare CMlLabel DataLabel; \tdeclare CMlEntry DataEntry; \t\t \tButtonIdPrefix = "player_button-"; \tDataIdPrefix = "player_label-"; \tDataEntryId = "allyLogin_entry"; \t \tButtonIdPrefixLength = TextLib::Length(ButtonIdPrefix); \tDataEntry <=> (Page.GetFirstChild(DataEntryId) as CMlEntry); \twhile(True) \t{ \t\tforeach(Event in PendingEvents) \t\t{ \t\t\tif(Event.Type == CMlEvent::Type::MouseOver) \t\t\t{ \t\t\t\tif(TextLib::SubString(Event.ControlId, 0, ButtonIdPrefixLength) == ButtonIdPrefix) \t\t\t\t{ \t\t\t\t\tClickedIndex = TextLib::SubString(Event.ControlId, ButtonIdPrefixLength, 2); \t\t\t\t\tDataLabel <=> (Page.GetFirstChild(DataIdPrefix^ClickedIndex) as CMlLabel); \t\t\t\t\tif(DataLabel != Null)\t \t\t\t\t\t{ \t\t\t\t\t\tDataEntry.Value = DataLabel.Value; \t\t\t\t\t} \t\t\t\t} \t\t\t} \t\t} \t\tyield; \t} } EOSCRIPT ); $this->updateItemList(); }
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); }
protected function postFilter() { parent::postFilter(); if ($this->name !== null) { $this->xml->setAttribute('name', $this->name); } if ($this->defaultValue !== null) { $this->xml->setAttribute('default', $this->defaultValue); } }
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(); } }
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); }
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); }
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 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(); }
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); }
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); }
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); }
protected function onConstruct() { $this->setLayer(\ManiaLive\Gui\Window::LAYER_CUT_SCENE); $this->background = new Elements\Quad(190, 190); $this->background->setAlign('center', 'center'); $this->background->setImage('file://Media/Manialinks/Common/Lobbies/versus-bg.dds', true); $this->addComponent($this->background); $this->label = new Elements\Label(200, 20); $this->label->setPosY(40); $this->label->setAlign('center', 'center2'); $this->label->setStyle(\ManiaLib\Gui\Elements\Label::TextRaceMessageBig); $this->label->setTextid('text'); $this->label->setId('info-label'); $this->label->setTextSize(2); $this->addComponent($this->label); $this->transferLabel = clone $this->label; $this->transferLabel->setPosY(40); $this->transferLabel->setTextColor(null); $this->transferLabel->setTextid('transferText'); $this->transferLabel->setId('transfer-label'); $this->addComponent($this->transferLabel); $this->cancelLabel = new Elements\Label(200); $this->cancelLabel->setPosY(-47); $this->cancelLabel->setAlign('center', 'center2'); $this->cancelLabel->setStyle(\ManiaLib\Gui\Elements\Label::TextRaceMessageBig); $this->cancelLabel->setTextColor('AAA'); $this->cancelLabel->setTextid('cancel'); $this->cancelLabel->setId('cancel-label'); $this->cancelLabel->setTextSize(7); $this->addComponent($this->cancelLabel); $layout = new \ManiaLib\Gui\Layouts\Column(); $layout->setMarginHeight(1); $this->team1 = new \ManiaLive\Gui\Controls\Frame(); $this->team1->setLayout($layout); $this->team1->setPosition(-45); $this->addComponent($this->team1); $this->team2 = clone $this->team1; $this->team2->setPosX(45); $this->addComponent($this->team2); }
protected function onConstruct() { $this->background = new Elements\Quad(320, 142); $this->background->setAlign('center', 'center'); $this->background->setImage('http://static.maniaplanet.com/manialinks/lobbies/background.png', true); $this->addComponent($this->background); $this->label = new Elements\Label(200, 20); $this->label->setPosY(47); $this->label->setAlign('center', 'center2'); $this->label->setStyle(\ManiaLib\Gui\Elements\Label::TextRaceMessageBig); $this->label->setTextid('text'); $this->label->setId('info-label'); $this->label->setTextSize(7); $this->addComponent($this->label); $this->transferLabel = clone $this->label; $this->transferLabel->setPosY(47); $this->transferLabel->setTextColor(null); $this->transferLabel->setTextid('transferText'); $this->transferLabel->setId('transfer-label'); $this->addComponent($this->transferLabel); $this->cancelLabel = new Elements\Label(200); $this->cancelLabel->setPosY(-47); $this->cancelLabel->setAlign('center', 'center2'); $this->cancelLabel->setStyle(\ManiaLib\Gui\Elements\Label::TextRaceMessageBig); $this->cancelLabel->setTextColor('AAA'); $this->cancelLabel->setTextid('cancel'); $this->cancelLabel->setId('cancel-label'); $this->cancelLabel->setTextSize(7); $this->addComponent($this->cancelLabel); $layout = new \ManiaLib\Gui\Layouts\Column(); $layout->setMarginHeight(2); $this->players = new \ManiaLive\Gui\Controls\Frame(); $this->players->setLayout($layout); $this->players->setPosition(0, 33); $this->addComponent($this->players); }
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(); }
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); }