Manialink Library (ToolTip Tutorial)

Talk about ManiaLink development in this forum

Moderator: NADEO

Post Reply
Sheiken
Posts: 12
Joined: 23 Apr 2016, 01:38

Manialink Library (ToolTip Tutorial)

Post by Sheiken »

Hi, i´m noob in scripting, but i found this tutorial on github about how to use the Manialink/Library https://github.com/maniaplanet/library- ... k#tooltips.

So i do this:

-I read the explanation
-I Copy this code in the interface designer

Code: Select all

<quad posn="0 0" sizen="10 10" halign="center" valign="center" bgcolor="fff" scriptevents="1" class="LibManialink_TooltipShow" id="Tooltip_Default" />
<frame hidden="1" class="LibManialink_Tooltip" id="Tooltip_Default">
  <label posn="0 0 1" sizen="48 4" halign="center" valign="center2" textsize="1.5" textcolor="aaa" id="Tooltip_Message" />
  <quad sizen="50 6" halign="center" valign="center" bgcolor="000d" id="Tooltip_BoundingBox" />
</frame>

<script><!--

// Paste the tooltip module here
// ...

main() {
  LibManialink_SetTooltipMessage("Tooltip_Default", "This is the default tooltip.");

  while (True) {
    yield;
    
    LibManialink_TooltipLoop();
  }
}
--></script>
-And add this modules in the beginning of the script

Code: Select all

#Include "MathLib" as ML
#Include "TextLib" as TL
-So the complete code is:

Code: Select all

<quad posn="0 0" sizen="10 10" halign="center" valign="center" bgcolor="fff" scriptevents="1" class="LibManialink_TooltipShow" id="Tooltip_Default" />
<frame hidden="1" class="LibManialink_Tooltip" id="Tooltip_Default">
  <label posn="0 0 1" sizen="48 4" halign="center" valign="center2" textsize="1.5" textcolor="aaa" id="Tooltip_Message" />
  <quad sizen="50 6" halign="center" valign="center" bgcolor="000d" id="Tooltip_BoundingBox" />
</frame>

<script><!--

// Paste the tooltip module here
// ...
#Include "MathLib" as ML
#Include "TextLib" as TL

main() {
  LibManialink_SetTooltipMessage("Tooltip_Default", "This is the default tooltip.");

  while (True) {
    yield;
    
    LibManialink_TooltipLoop();
  }
}
--></script>
But the tooltip dont show when i run the xml file in the interface designer :? :x



Would someone be so kind as to explain explaining what I do wrong?
zocka
Posts: 205
Joined: 15 Jun 2010, 17:56

Re: Manialink Library (ToolTip Tutorial)

Post by zocka »

When it says to paste the tooltip module, you are supposed to paste this file's content there:
https://github.com/maniaplanet/library- ... Script.txt
(after the #Include statements from your example code)
With that it worked for me.
manialink minigame shatter
my manialink: zockaml
my maniaflash: maniaflash?zocka
Sheiken
Posts: 12
Joined: 23 Apr 2016, 01:38

Re: Manialink Library (ToolTip Tutorial)

Post by Sheiken »

zocka wrote: 07 Apr 2017, 07:49 When it says to paste the tooltip module, you are supposed to paste this file's content there:
https://github.com/maniaplanet/library- ... Script.txt
(after the #Include statements from your example code)
With that it worked for me.

Thanks Zocka for the prompt response, you have helped me a lot. :1010
Post Reply

Return to “ManiaLink”

Who is online

Users browsing this forum: No registered users and 0 guests