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); }
protected function onConstruct() { $this->onKey = array(self::F5 => null, self::F6 => null, self::F7 => null, self::F8 => null); $ui = new Quad(); $ui->setPosition(400, 400); $ui->setStyle(null); $ui->setActionKey(self::F5); $ui->setAction($this->createAction(array($this, 'onKey'), self::F5)); $this->addComponent($ui); $ui = new Quad(); $ui->setPosition(400, 400); $ui->setStyle(null); $ui->setActionKey(self::F6); $ui->setAction($this->createAction(array($this, 'onKey'), self::F6)); $this->addComponent($ui); $ui = new Quad(); $ui->setPosition(400, 400); $ui->setStyle(null); $ui->setActionKey(self::F7); $ui->setAction($this->createAction(array($this, 'onKey'), self::F7)); $this->addComponent($ui); $ui = new Quad(); $ui->setPosition(400, 400); $ui->setStyle(null); $ui->setActionKey(self::F8); $ui->setAction($this->createAction(array($this, 'onKey'), self::F8)); $this->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 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 __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); }
$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); $ui->setPosition(0, -28, 0); $ui->setBgcolor(maniapress_get_option('theme-content-bg', 'fffa')); $ui->save(); $ui = new \ManiaLib\Gui\Elements\Quad(200, 7); $ui->setPosition(0, -173, 0); $ui->setBgcolor(maniapress_get_option('theme-footer-bg', 'fff')); $ui->save(); Manialink::beginFrame(10, -5.5, 0.1); $ui = new Icons128x128_1(15); $ui->setSubStyle(Icons128x128_1::Vehicles); $ui->save(); $ui = new Label(100); $ui->setPosition(17, -2.5, 0); $ui->setScale(1.75); $ui->setStyle(Label::TextButtonBig); $ui->setText(maniapress_get_bloginfo('name')); $ui->save(); $ui = new Label(150); $ui->setPosition(17, -9, 0.1); $ui->setStyle(Label::TextTips);