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(); } }
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 display() { Manialink::load(); $ui = new Panel($this->width, $this->height); $ui->setAlign('center', 'center'); $ui->title->setStyle(Label::TextTitleError); $ui->titleBg->setSubStyle(Bgs1::BgTitle2); $ui->title->setText('Error'); $ui->save(); $ui = new Label($this->width - 4); $ui->enableAutonewline(); $ui->setAlign('center', 'center'); $ui->setPosition(0, -5, 1); $ui->setText($this->message); $ui->save(); $ui = new Button(); $ui->setText($this->response->errorButtonMessage ?: 'Back'); $ui->setManiazone($this->response->errorManialink ?: $this->response->backLink); $ui->setPosition(0, -($this->height / 2) + 12, 1); $ui->setHalign('center'); $ui->save(); Manialink::render(); }
public function display() { Manialink::load(); Manialink::appendXML(Dictionary::getInstance()->getManiaLink($this->displayedText)); Manialink::appendScript(<<<MANIASCRIPT #RequireContext CMlScript #Include "MathLib" as MathLib #Include "TextLib" as TextLib main() { \tdeclare Boolean countdown = True; \tdeclare Integer countdownTime = CurrentTime; \tdeclare Integer countdownTimeLeft = 10; \tdeclare CMlFrame frame <=> (Page.MainFrame.GetFirstChild("block-quit") as CMlFrame); \tdeclare CMlLabel label <=> (Page.MainFrame.GetFirstChild("countdown-label") as CMlLabel); \tlabel.SetText(TextLib::ToText(countdownTimeLeft)); \twhile(True) \t{ \t\tif(countdown && countdownTimeLeft >= 0 && CurrentTime - countdownTime > 1000) \t\t{ \t\t\tcountdownTime = CurrentTime; \t\t\tcountdownTimeLeft = countdownTimeLeft - 1; \t\t\tlabel.SetText(TextLib::ToText(countdownTimeLeft)); \t\t} \t\telse if(countdown && countdownTimeLeft <= 0) \t\t{ \t\t\tframe.Hide(); \t\t} \t\tyield; \t} } MANIASCRIPT ); $frame = new \ManiaLib\Gui\Elements\Frame(); $frame->setPosition(0, 5, 0); $label = new Label(170); $label->setAlign('center', 'center2'); $label->setStyle(Label::TextRaceMessageBig); $label->setTextSize(5); $label->setTextColor('f00'); $label->setTextId('text'); $frame->add($label); $iconBlink = new Icons128x128_Blink(15); $iconBlink->setAlign('right', 'center'); $iconBlink->setPosition(-87, 0); $iconBlink->setSubStyle(Icons128x128_Blink::Hard); $frame->add($iconBlink); $iconBlink = new Icons128x128_Blink(15); $iconBlink->setAlign('left', 'center'); $iconBlink->setPosition(87, 0); $iconBlink->setSubStyle(Icons128x128_Blink::Hard); $frame->add($iconBlink); $frame->save(); $frame = new \ManiaLib\Gui\Elements\Frame(); $frame->setPosition(0, -6.5, 10); $frame->setScriptEvents(); $frame->setId('block-quit'); $bg = new Bgs1(180, 45); $bg->setSubStyle(Bgs1::BgDialogBlur); $bg->setAlign('center'); $bg->setScriptEvents(); $bg->setId('background'); $bg->setManialink(''); $frame->add($bg); $bg = new Quad(180, 45); $bg->setBgcolor('0008'); $bg->setAlign('center'); $bg->setScriptEvents(); $frame->add($bg); $ui = new Label(120); $ui->setAlign('center'); $ui->setPosition(0, -6, 0.1); $ui->setStyle(Label::TextRaceMessageBig); $ui->setTextSize(4); $ui->setTextid('available'); $frame->add($ui); $ui = new Label(20); $ui->setId('countdown-label'); $ui->setAlign('center'); $ui->setPosition(0, -15, 0.1); $ui->setStyle(Label::TextRaceMessageBig); $ui->setTextSize(5); $ui->setText('10'); $frame->add($ui); $frame->save(); return Manialink::render(true); }
* * @see http://code.google.com/p/maniapress/ * @copyright Copyright (c) 2011-2012 NADEO (http://www.nadeo.com) * @license http://www.gnu.org/licenses/lgpl.html LGPL License 3 * @version $Revision$: * @author $Author$: * @date $Date$: */ use ManiaLib\Gui\Manialink; use ManiaLib\Gui\Cards\Panel; use ManiaLib\Gui\Elements\Label; use ManiaLib\Gui\Elements\Quad; use ManiaLib\Gui\Elements\Icons128x128_1; use ManiaLib\Gui\Elements\Icons64x64_1; use ManiaLib\Gui\Elements\UIConstructionSimple_Buttons; Manialink::load(); $ui = new \ManiaLib\Gui\Elements\IncludeManialink(); $ui->setUrl('manialib.xml', false); $ui->save(); \ManiaLib\ManiaScript\Main::begin(); $background = maniapress_get_option('theme-background'); $ui = new Quad(320, 180); $ui->setAlign('center', 'center'); if ($background) { if (ctype_xdigit($background) && strlen($background) < 4) { $ui->setBgcolor($background); } else { $ui->setImage($background, true); } } else { $ui->setImage('bg.jpg');