protected function onConstruct() { $this->setLayer(\ManiaLive\Gui\Window::LAYER_CUT_SCENE); $this->setSize(self::SIZE_X, self::SIZE_Y); $this->setRelativeAlign('center', 'top'); $this->setPosition(0, 84); $this->bg = new Elements\Quad(self::SIZE_X, self::SIZE_Y); $this->bg->setImage('file://Media/Manialinks/Common/Lobbies/header.png'); $this->bg->setAlign('center'); $this->addComponent($this->bg); $this->serverNameLabel = new Elements\Label(self::SIZE_X - 7); $this->serverNameLabel->setStyle(Elements\Label::TextRaceMessage); $this->serverNameLabel->setAlign('center', 'top'); $this->serverNameLabel->setPosition(0, -4); $this->serverNameLabel->setTextSize(3); $this->addComponent($this->serverNameLabel); $this->avgWaitingTimeLabel = new Elements\Label(self::SIZE_X / 3); $this->avgWaitingTimeLabel->setAlign('right', 'center'); $this->avgWaitingTimeLabel->setStyle(Elements\Label::TextRaceMessage); $this->avgWaitingTimeLabel->setPosition(self::SIZE_X / 2 - 5, -16); $this->avgWaitingTimeLabel->setTextId('avgWaiting'); $this->avgWaitingTimeLabel->setTextSize(2); $this->avgWaitingTimeLabel->setOpacity(0.75); $this->addComponent($this->avgWaitingTimeLabel); $this->avgWaitingTimeHelperLabel = new Elements\Label(self::SIZE_X / 2); $this->avgWaitingTimeHelperLabel->setAlign('right', 'top'); $this->avgWaitingTimeHelperLabel->setStyle(Elements\Label::TextRaceMessage); $this->avgWaitingTimeHelperLabel->setPosition($this->avgWaitingTimeLabel->getPosX(), -18); $this->avgWaitingTimeHelperLabel->setTextId('avgWaitingHelper'); $this->avgWaitingTimeHelperLabel->setScale(0.5); $this->avgWaitingTimeHelperLabel->setOpacity(0.5); $this->addComponent($this->avgWaitingTimeHelperLabel); $this->playerCountLabel = new Elements\Label(self::SIZE_X / 3); $this->playerCountLabel->setAlign('left', 'center'); $this->playerCountLabel->setStyle(Elements\Label::TextRaceMessage); $this->playerCountLabel->setPosition(-self::SIZE_X / 2 + 5, -16); $this->playerCountLabel->setOpacity(0.75); $this->playerCountLabel->setTextSize(2); $this->playerCountLabel->setTextid('nPlayers'); $this->addComponent($this->playerCountLabel); $this->playerCountHelperLabel = new Elements\Label(self::SIZE_X / 2); $this->playerCountHelperLabel->setAlign('left', 'top'); $this->playerCountHelperLabel->setStyle(Elements\Label::TextRaceMessage); $this->playerCountHelperLabel->setPosition($this->playerCountLabel->getPosX(), -18); $this->playerCountHelperLabel->setTextId('nPlayersHelper'); $this->playerCountHelperLabel->setScale(0.5); $this->playerCountHelperLabel->setOpacity(0.5); $this->addComponent($this->playerCountHelperLabel); }
$ui = new \ManiaLib\Gui\Elements\BgRaceScore2(13, 13); $ui->setPosition(25, 1.75, 0.1); $ui->setSubStyle(\ManiaLib\Gui\Elements\BgRaceScore2::Speaking); $ui->save(); Manialink::endFrame(); $ui = new Label(190); $ui->setPosition(0, -12); $ui->enableAutonewline(); $ui->setMaxline(21); $ui->setTextColor('000'); $ui->setTextSize(2); $ui->setText(maniapress_html_filter(get_the_content())); $ui->save(); $ui = new \ManiaLib\Gui\Elements\Button(); $ui->setHalign('center'); $ui->setPosition(95, -105, 0.1); $ui->setStyle(\ManiaLib\Gui\Elements\Button::CardButtonSmallWide); $ui->setUrl(ManiaLib\Utils\URI::getCurrent()); $ui->setText('Read the full post on the Web'); $ui->save(); $categories = maniapress_get_categories(get_the_ID()); $tags = maniapress_get_tags(get_the_ID()); $metadata = sprintf('This entry was written by %s, posted on %s at %s, filed under %s and tagged %s.', get_the_author(), the_date('', '', '', false), get_the_time(), $categories, $tags); $ui = new Label(190 / 1.25); $ui->setScale(1.25); $ui->setPosition(0, -115, 0); $ui->setStyle(Label::TextButtonSmall); $ui->setText($metadata); $ui->enableAutonewline(); $ui->save(); Manialink::endFrame();
use ManiaLib\Gui\Manialink; use ManiaLib\Gui\Elements\Label; get_header(); if (have_posts()) { $layout = new \ManiaLib\Gui\Layouts\Column(); $layout->setMarginHeight(1); Manialink::beginFrame(-95, 50, 0.2, 1, $layout); while (have_posts()) { the_post(); get_template_part('content', get_post_format()); } Manialink::endFrame(); $next = maniapress_html_decode(\ManiaLib\Utils\Arrays::get(explode('"', get_next_posts_link()), 1)); $prev = maniapress_html_decode(\ManiaLib\Utils\Arrays::get(explode('"', get_previous_posts_link()), 1)); $ui = new ManiaLib\Gui\Cards\PageNavigator(); $ui->setPosition(0, -75, 0); $ui->arrowNext->setManialink($next); $ui->arrowPrev->setManialink($prev); $ui->save(); } else { $ui = new Label(120 / 1.5); $ui->setScale(1.5); $ui->setHalign('center'); $ui->setPosition(0, 40, 0.2); $ui->enableAutonewline(); $ui->setStyle(Label::TextButtonSmall); $ui->setText('Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.'); $ui->save(); } get_sidebar(); get_footer();
function onConstruct() { $this->setLayer(\ManiaLive\Gui\Window::LAYER_CUT_SCENE); $this->dico = array('playing' => 'playing', 'rules' => 'rules', 'ready' => 'ready', 'invite' => 'invite', 'readyButton' => 'readyButton', 'players' => 'players', 'allies' => 'party', 'avgWaiting' => 'waitingScreenWaitingLabel', 'rules' => 'rules', 'back' => 'quit'); // $ui = new Elements\Quad(320, 20); // $ui->setAlign('center', 'bottom'); // $ui->setBgcolor('000'); // $ui->setPosition(0,-90); // $this->addComponent($ui); $ui = new Elements\Quad(self::SIZE_X, self::SIZE_Y); $ui->setAlign('center', 'center'); $ui->setImage('http://static.maniaplanet.com/manialinks/lobbies/2013-08-23/main-bg.png', true); $this->addComponent($ui); $ui = new Elements\Label(self::SIZE_X); $ui->setAlign('center', 'top'); $ui->setPosition(0, 38); $ui->setTextColor('fff'); $ui->setScale(0.9); $ui->setTextSize(2.5); $ui->enableAutonewline(); $ui->setTextid('text'); $ui->setOpacity(0.9); $this->addComponent($ui); $frame = new Frame(); $frame->setScale(0.6); $frame->setPosition(0, 20); $this->addComponent($frame); $this->emptySlot = new \ManiaLivePlugins\MatchMakingLobby\Controls\EmptySlot(); $this->emptySlot->setSize(80, 20); $this->emptySlot->setAlign('center'); $this->dico[$this->emptySlot->getLabelTextid()] = 'picked'; $this->playerListFrame = new \ManiaLive\Gui\Controls\Frame(0, 5, new \ManiaLib\Gui\Layouts\Column()); $this->playerListFrame->getLayout()->setMarginHeight(3); $frame->addComponent($this->playerListFrame); //quit button start $this->quitButtonFrame = new Frame(); $this->quitButtonFrame->setSize(35, 10); $this->quitButtonFrame->setPosition(-47, -36); $this->addComponent($this->quitButtonFrame); $ui = new Elements\Quad($this->quitButtonFrame->getSizeX(), 10); $ui->setAlign('center', 'center'); $ui->setImage('file://Media/Manialinks/Common/Lobbies/small-button-RED.dds', true); $ui->setImageFocus('file://Media/Manialinks/Common/Lobbies/small-button-RED-ON.dds', true); $ui->setAction('maniaplanet:quitserver'); $this->quitButtonFrame->addComponent($ui); $ui = new Elements\Label($this->quitButtonFrame->getSizeX()); $ui->setAlign('center', 'center2'); $ui->setStyle(Elements\Label::TextRaceMessageBig); $ui->setTextid('back'); $ui->setOpacity(0.8); $ui->setTextSize(2); $ui->setScale(0.95); $this->quitButtonFrame->addComponent($ui); //quit button end //learn button start if (static::$rulesManialink) { $this->learnButtonFrame = new Frame(); $this->learnButtonFrame->setSize(35, 10); $this->learnButtonFrame->setPosition(0, -25); $this->addComponent($this->learnButtonFrame); $ui = new Elements\Quad($this->learnButtonFrame->getSizeX(), 10); $ui->setAlign('center', 'center'); // $ui->setImage('file://Media/Manialinks/Common/Lobbies/small-button-YELLOW.dds', true); // $ui->setImageFocus('file://Media/Manialinks/Common/Lobbies/small-button-YELLOW-ON.dds', true); $ui->setImage('http://static.maniaplanet.com/manialinks/lobbies/2013-08-23/small-button-YELLOW.dds', true); $ui->setImageFocus('http://static.maniaplanet.com/manialinks/lobbies/2013-08-23/small-button-YELLOW-ON.dds', true); $ui->setManialink(static::$rulesManialink); $this->learnButtonFrame->addComponent($ui); $ui = new Elements\Label($this->learnButtonFrame->getSizeX()); $ui->setAlign('center', 'center2'); $ui->setStyle(Elements\Label::TextRaceMessageBig); $ui->setTextid('rules'); $ui->setOpacity(0.8); $ui->setTextSize(2); $ui->setScale(0.95); $this->learnButtonFrame->addComponent($ui); } //learn button end //ready button start $this->readyButtonFrame = new Frame(); $this->readyButtonFrame->setSize(48, 12); $this->readyButtonFrame->setPosition(0, -36); $this->addComponent($this->readyButtonFrame); $this->readyButton = new Elements\Quad(48, $this->readyButtonFrame->getSizeY()); $this->readyButton->setAlign('center', 'center'); $this->readyButton->setImage('file://Media/Manialinks/Common/Lobbies/ready-button-GREEN.dds', true); $this->readyButton->setImageFocus('file://Media/Manialinks/Common/Lobbies/ready-button-GREEN-ON.dds', true); $this->readyButtonFrame->addComponent($this->readyButton); $ui = new Elements\Label(48, $this->readyButtonFrame->getSizeY()); $ui->setAlign('center', 'center2'); $ui->setStyle(Elements\Label::TextRaceMessageBig); $ui->setTextid('readyButton'); $ui->setOpacity(0.8); $ui->setTextSize(2.5); $this->readyButtonFrame->addComponent($ui); //ready button end //Invite button start $this->inviteButtonFrame = new Frame(); $this->inviteButtonFrame->setSize(35, 10); $this->inviteButtonFrame->setPosition(47, -36); $this->addComponent($this->inviteButtonFrame); $ui = new Elements\Quad($this->inviteButtonFrame->getSizeX(), 10); $ui->setAlign('center', 'center'); $ui->setImage('file://Media/Manialinks/Common/Lobbies/small-button-BLUE.dds', true); $ui->setImageFocus('file://Media/Manialinks/Common/Lobbies/small-button-BLUE-ON.dds', true); $ui->setManialink(static::$inviteManialink); $this->inviteButtonFrame->addComponent($ui); $ui = new Elements\Label($this->inviteButtonFrame->getSizeX()); $ui->setAlign('center', 'center2'); $ui->setStyle(Elements\Label::TextRaceMessageBig); $ui->setTextid('invite'); $ui->setOpacity(0.8); $ui->setTextSize(2); $ui->setScale(0.95); $this->inviteButtonFrame->addComponent($ui); //Invite button end $this->logo = new Elements\Quad(80, 20); $this->logo->setAlign('center', 'bottom'); $this->logo->setPosY(-90); }
* @license http://www.gnu.org/licenses/lgpl.html LGPL License 3 * @version $Revision$: * @author $Author$: * @date $Date$: */ use ManiaLib\Gui\Manialink; use ManiaLib\Gui\Elements\Label; use ManiaLib\Gui\Elements\Icons64x64_1; use ManiaLib\ManiaScript\UI; use ManiaLib\ManiaScript\Action; use ManiaLib\ManiaScript\Event; Manialink::beginFrame(-100, -83, 0.2); $ui = new Label(175); $ui->setValign('center2'); $ui->setPosition(3, -3.5, 0); $ui->setScale(0.75); $ui->setStyle(Label::TextInfoSmall); $ui->setText(sprintf('$<$000%s$> is proudly powered by $l[http://wordpress.org/]WordPress$l and $l[http://code.google.com/p/maniapress/]ManiaPress$l.', maniapress_get_bloginfo('name'))); $ui->save(); if (maniapress_get_option('manialink')) { Manialink::beginFrame(150, 1.5, 0.1); $params['url'] = maniapress_get_option('manialink'); if (maniapress_get_option('manialink-name')) { $params['name'] = maniapress_get_option('manialink-name'); } $url = 'http://maniahome.maniaplanet.com/add/?' . http_build_query($params); $ui = new \ManiaLib\Gui\Elements\IncludeManialink(); $ui->setUrl($url); $ui->save(); Manialink::endFrame(); }
$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); $ui->setText(maniapress_get_bloginfo('description')); $ui->save(); Manialink::endFrame(); Manialink::beginFrame(145, -8.5, 0.1); $ui = new \ManiaLib\Gui\Elements\Entry(40, 5); $ui->setName('search'); $ui->setDefault(\ManiaLib\Application\Request::getInstance()->get('s')); $ui->save(); $ui = new Icons64x64_1(6);