protected function onConstruct()
 {
     parent::onConstruct();
     $this->script = new \ManiaLivePlugins\eXpansion\Gui\Structures\Script("libraries/ManialivePlugins/pluginAcme/Gui/Script", true);
     $this->registerScript($this->script);
     for ($x = 1; $x <= $this->count; $x++) {
         $quad = new \ManiaLib\Gui\Elements\Quad(6, 6);
         $quad->setId("ball" . $x);
         $quad->setStyle("ManiaPlanetLogos");
         $quad->setSubStyle("IconPlanets");
         $this->addComponent($quad);
     }
 }
 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();
 }
Esempio n. 3
0
 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();
 }
Esempio n. 4
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);
 }
Esempio n. 5
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();
}