Label styles cheat sheet

Talk about ManiaLink development in this forum

Moderator: NADEO

Post Reply
User avatar
gouxim
Nadeo
Nadeo
Posts: 1186
Joined: 14 Jun 2010, 17:20

Label styles cheat sheet

Post by gouxim »

The example Manialink is great but is not very practical for Label styles, so I did a quick and dirty cheat sheet for label styles, ie. every styles with and without link.

Manialink: labels
labels.PNG
Please do not PM for support. Instead, create a thread so that everyone can contribute or benefit from the answer! 8-)
User avatar
gouxim
Nadeo
Nadeo
Posts: 1186
Joined: 14 Jun 2010, 17:20

Re: Label styles cheat sheet

Post by gouxim »

And if anyone is wondering, here's the PHP code to display that with ManiaLib:

Code: Select all

use ManiaLib\Gui\Manialink;
use ManiaLib\Gui\Elements\Label;

$reflection = new \ReflectionClass('\ManiaLib\Gui\Elements\Label');
$styles = $reflection->getConstants();

Manialink::beginFrame(-128, 86, 0, 1, new \ManiaLib\Gui\Layouts\Flow(320, 180));
foreach($styles as $style)
{
	$ui = new Label(64, 8);
	$ui->setAlign('center', 'center');
	$ui->setStyle($style);
	$ui->setText($style);
	$ui->save();

	$ui = new Label(64, 8);
	$ui->setAlign('center', 'center');
	$ui->setManialink('labels');
	$ui->setStyle($style);
	$ui->setText($style);
	$ui->save();
}
Manialink::endFrame();

Manialink::beginFrame(123, -81);
{
	$url = 'http://maniahome.maniaplanet.com/add/?'.http_build_query(
			array(
				'url' => 'labels',
				'name' => '$09fManiaplanet$z label styles'));
	$ui = new \ManiaLib\Gui\Elements\IncludeManialink();
	$ui->setUrl($url);
	$ui->save();
}
Manialink::endFrame();
Please do not PM for support. Instead, create a thread so that everyone can contribute or benefit from the answer! 8-)
Akbalder
Posts: 1059
Joined: 15 Jun 2010, 11:00
Contact:

Re: Label styles cheat sheet

Post by Akbalder »

Do the styles of the markers (ie: icon="PointA") exist?
I tried style="SmIcons128x128_1" subtyle="PointA" but it doesn't seem to work. :(

Having an up to date list of all the styles would be great. ;)
User avatar
djhubertus
Translator
Translator
Posts: 1097
Joined: 09 Jul 2012, 18:30
Location: Poland
Contact:

Re: Label styles cheat sheet

Post by djhubertus »

@refresh

Where i can find smicons128x128 list ? :D
My Gamemodes:
MP4 - Countdown, Firefight
MP3 - Reduction, Overload, Flashpoint, Territory, SM Race, Escape
MP2 - Search & Destroy, Oscillation, Instagib
User avatar
steeffeen
Translator
Translator
Posts: 2463
Joined: 14 Oct 2012, 16:22
Location: Germany

Re: Label styles cheat sheet

Post by steeffeen »

i'm not sure what you mean but there isn't any SMIcons library.. there are several images in the game data which are used for realm and so on though

Code: Select all

"file://Media/Manialinks/Shootmania/Common/..."
you can find the files in:
/ProgramData/ManiaPlanet/PacksCache/ShootMania_extras.zip/Media/Manialinks/ShootMania/Common/..
(btw isn't this thread about label styles and not quad styles? :D)
    Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

    ManiaControl, FancyManiaLinks
    User avatar
    djhubertus
    Translator
    Translator
    Posts: 1097
    Joined: 09 Jul 2012, 18:30
    Location: Poland
    Contact:

    Re: Label styles cheat sheet

    Post by djhubertus »

    In shootmania pack there is a smicons128x128_1 .dds image with icons (for example goal marker from elite )
    And you can use this with <marker icon="">
    My Gamemodes:
    MP4 - Countdown, Firefight
    MP3 - Reduction, Overload, Flashpoint, Territory, SM Race, Escape
    MP2 - Search & Destroy, Oscillation, Instagib
    User avatar
    steeffeen
    Translator
    Translator
    Posts: 2463
    Joined: 14 Oct 2012, 16:22
    Location: Germany

    Re: Label styles cheat sheet

    Post by steeffeen »

    ah yeah, i see
    knowing how the icon="" works would be great indeed
      Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

      ManiaControl, FancyManiaLinks
      Post Reply

      Return to “ManiaLink”

      Who is online

      Users browsing this forum: No registered users and 1 guest