Label styles cheat sheet

Talk about ManiaLink development in this forum

Moderator: NADEO

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

Label styles cheat sheet

Post by gouxim » 21 Nov 2011, 15:18

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
You do not have the required permissions to view the files attached to this post.
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: 1188
Joined: 14 Jun 2010, 17:20

Re: Label styles cheat sheet

Post by gouxim » 21 Nov 2011, 15:20

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-)

User avatar
Akbalder
Posts: 1057
Joined: 15 Jun 2010, 11:00
Contact:

Re: Label styles cheat sheet

Post by Akbalder » 06 Mar 2013, 20:35

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: 1235
Joined: 09 Jul 2012, 18:30
Location: Poland
Contact:

Re: Label styles cheat sheet

Post by djhubertus » 19 May 2013, 18:42

@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: 2472
Joined: 14 Oct 2012, 16:22
Location: Germany

Re: Label styles cheat sheet

Post by steeffeen » 19 May 2013, 20:44

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: 1235
    Joined: 09 Jul 2012, 18:30
    Location: Poland
    Contact:

    Re: Label styles cheat sheet

    Post by djhubertus » 19 May 2013, 21:57

    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: 2472
    Joined: 14 Oct 2012, 16:22
    Location: Germany

    Re: Label styles cheat sheet

    Post by steeffeen » 19 May 2013, 23:35

    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 0 guests