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 __construct($nickname) { $this->setSize(46, 5); $this->bg = new Elements\Bgs1InRace($this->sizeX, $this->sizeY); $this->bg->setBgcolor('3338'); $this->bg->setBgcolorFocus('CCC8'); $this->bg->setScriptEvents(); $this->addComponent($this->bg); $this->icon = new Elements\Quad(2, $this->sizeY); $this->icon->setBgcolor('F00'); $this->icon->setAlign('left', 'center'); $this->addComponent($this->icon); $this->label = new Elements\Label(34); $this->label->setValign('center2'); $this->label->setText($nickname); $this->label->setTextColor('fff'); $this->label->setTextSize(1); $this->addComponent($this->label); $this->hiddenLabel = new Elements\Label(); $this->hiddenLabel->setHidden(true); $this->addComponent($this->hiddenLabel); $this->echelonFrame = new \ManiaLive\Gui\Controls\Frame(73.5, 1); $this->echelonFrame->setScale(0.29); $this->addComponent($this->echelonFrame); $this->echelonQuad = new Elements\Quad(14.1551, 17.6938); $this->echelonQuad->setPosition(-1.25, -1.25); $this->echelonQuad->setAlign('center', 'top'); $this->echelonFrame->addComponent($this->echelonQuad); $ui = new Elements\Label(15); $ui->setAlign('center', 'top'); $ui->setStyle(Elements\Label::TextRaceMessage); $ui->setPosition(-1, -4.95625); $ui->setTextSize(0.5); $ui->setText('Echelon'); $this->echelonFrame->addComponent($ui); $this->echelonLabel = new Elements\Label(10, 10); $this->echelonLabel->setAlign('center', 'center'); $this->echelonLabel->setPosition(-1, -11.895); $this->echelonLabel->setStyle(Elements\Label::TextRaceMessageBig); $this->echelonFrame->addComponent($this->echelonLabel); $this->countryFlag = new Elements\Quad(5, 5); $this->countryFlag->setAlign('left', 'center'); $this->addComponent($this->countryFlag); $this->nickname = $nickname; $this->state = static::STATE_NOT_READY; }
function display() { Manialink::load(); if (static::$showRefreshButton) { $ui = new Icons64x64_1(10); $ui->setAlign('right', 'bottom'); $ui->setSubStyle('Refresh'); $ui->setPosition(160, -90, 15); $ui->setManiazone($this->request->createLink()); $ui->save(); } }
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); }
/** * Saves the PageNavigator in the GUI objects stack */ function preFilter() { // Show / hide text if (!$this->currentPage || !$this->pageNumber) { $this->showText(false); } // Auto show fast next / last if ($this->arrowFirst->hasLink() || $this->arrowLast->hasLink()) { $this->showLast(); } if ($this->arrowFastNext->hasLink() || $this->arrowFastPrev->hasLink()) { $this->showFastNext(); } // Arrow styles if ($this->arrowNext->hasLink()) { $this->arrowNext->setSubStyle($this->arrowNextStyle); } if ($this->arrowPrev->hasLink()) { $this->arrowPrev->setSubStyle($this->arrowPrevStyle); } if ($this->arrowNext->hasLink() && $this->arrowFastNext->hasLink()) { $this->arrowFastNext->setSubStyle($this->arrowFastNextStyle); } else { $this->arrowFastNext->setManialink(null); } if ($this->arrowPrev->hasLink() && $this->arrowFastPrev->hasLink()) { $this->arrowFastPrev->setSubStyle($this->arrowFastPrevStyle); } else { $this->arrowFastPrev->setManialink(null); } if ($this->arrowNext->hasLink() && $this->arrowLast->hasLink()) { $this->arrowLast->setSubStyle($this->arrowLastStyle); } else { $this->arrowLast->setManialink(null); } if ($this->arrowPrev->hasLink() && $this->arrowFirst->hasLink()) { $this->arrowFirst->setSubStyle($this->arrowFirstStyle); } else { $this->arrowFirst->setManialink(null); } // Text $this->text->setStyle(\ManiaLib\Gui\Elements\Label::TextValueSmall); $this->text->setText($this->currentPage . ' / ' . $this->pageNumber); // Positioning in relation to the center of the containing frame $this->text->setAlign("center", "center2"); $this->text->setPosZ(1); $this->textBg->setSubStyle(\ManiaLib\Gui\Elements\Bgs1::BgPager); $this->textBg->setAlign('center', 'center'); $this->textBg->setPosZ(0.5); $this->arrowNext->setValign("center"); $this->arrowFastNext->setValign("center"); $this->arrowLast->setValign("center"); $this->arrowNext->setPosition($this->text->getSizeX() / 2 + 1, 0, 1); $this->arrowFastNext->setPosition($this->arrowNext->getPosX() + $this->arrowNext->getSizeX(), 0, 1); $this->arrowLast->setPosition($this->arrowNext->getPosX() + (int) $this->showFastNext * $this->arrowFastNext->getSizeX() + $this->arrowNext->getSizeX(), 0, 1); $this->arrowPrev->setAlign("right", "center"); $this->arrowFastPrev->setAlign("right", "center"); $this->arrowFirst->setAlign("right", "center"); $this->arrowPrev->setPosition(-($this->text->getSizeX() / 2) - 1, 0, 1); $this->arrowFastPrev->setPosition($this->arrowPrev->getPosX() - $this->arrowPrev->getSizeX(), 0, 1); $this->arrowFirst->setPosition($this->arrowPrev->getPosX() - (int) $this->showFastNext * $this->arrowFastPrev->getSizeX() - $this->arrowPrev->getSizeX(), 0, 1); // Save the gui if ($this->showText) { $this->add($this->textBg); $this->add($this->text); } $this->add($this->arrowNext); $this->add($this->arrowPrev); if ($this->showLast) { $this->add($this->arrowFirst); $this->add($this->arrowLast); } if ($this->showFastNext) { $this->add($this->arrowFastNext); $this->add($this->arrowFastPrev); } }