Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
 public function display()
 {
     $manialink = $this->request->createLinkArgList('../audience-list/');
     $ui = new \ManiaLib\Gui\Cards\Navigation\Menu();
     $ui->title->setText(\ManiaHost\Config::getInstance()->appName);
     $ui->quitButton->setManialink($manialink);
     $ui->subTitle->setText('Admin panel');
     $ui->save();
     Manialink::beginFrame(32);
     $ui = new \ManiaLib\Gui\Elements\Quad(180, 60);
     $ui->setPosY(64);
     $ui->setHalign('center');
     $ui->setImage($this->response->avgGraphUrl, true);
     $ui->save();
     $ui = new \ManiaLib\Gui\Elements\Quad(180, 60);
     $ui->setPosY(-4);
     $ui->setHalign('center');
     $ui->setImage($this->response->maxGraphUrl, true);
     $ui->save();
     Manialink::endFrame();
 }
Ejemplo n.º 3
0
function maniapress_google_analytics()
{
    $propertyId = maniapress_get_option('google-analytics-id');
    if (!$propertyId) {
        return;
    }
    $tracker = new \ManiaLib\Application\Tracking\GoogleAnalytics($propertyId);
    $tracker->loadFromConfig();
    $ui = new \ManiaLib\Gui\Elements\Quad(0.01, 0.01);
    $ui->setPosition(800, 600);
    $ui->setImage($tracker->getTrackingURL(), true);
    $ui->save();
}