Invisible ManiaLink element [answered]

Talk about ManiaLink development in this forum

Moderator: NADEO

Post Reply
oliverde8
Posts: 1286
Joined: 16 Jun 2010, 07:33
Location: in a Blue Box

Invisible ManiaLink element [answered]

Post by oliverde8 »

Hi, I would like to know if it was possible to make an ManiaLink element hidden.

Here is what I have at the moment :
I have a icon with an id, button1 that will always stay visible(a quad)
I have a tootip frame with id, button1_description that is also visible at first.

My maniascript will first hide all buttons and as button numbers are ordered it is quite easy :

Code: Select all

for(i, minButtonId, maxButtonId ){
    if(Page.GetFirstChild("button"^i^"_description") != Null){
        Page.GetFirstChild("button"^i^"_description").Hide(); 
    }
}
Here is my problem. I am showing a tooltip on top of some icons. my Maniascript code will first hide all the tooltips then on MouseOver another element show them.The problem is I have a second script that also needs to put an id on the button. This second script isn't for the tooltip it is something else entirely. The 2 codes are separate, the tooltips are added in a"Visual Table" in a dynamic way and the maniascript code is put together dynamically. The easiest way would be to be able to have manialink elements hidden from start

The second way would be to get all elements of a certain class? but didn't find how to do that.

Thanks :D
Image
Developper for The next generation, Clean and Powerfull controller eXpansion for your SM & TM server . Working on eXpansion² with full MP4 support and many other awesome features...
User avatar
spaii
Posts: 1075
Joined: 19 Jun 2010, 00:04
Location: Rémy - France
Contact:

Re: Invisible ManiaLink element

Post by spaii »

<quad id="yourid" class="yourclass" sizen="10 10" posn="0 0 0" hidden="1" />
User avatar
steeffeen
Translator
Translator
Posts: 2463
Joined: 14 Oct 2012, 16:22
Location: Germany

Re: Invisible ManiaLink element

Post by steeffeen »

do you know about the "hidden" attribute?

Code: Select all

<control hidden="1"/>
elements of a class:
you mean xml class and not ManiaScript Object Class right?
then try

Code: Select all

Void 	GetClassChildren (Text Class, CMlFrame Frame, Boolean Recursive)
const CMlControl[] 	GetClassChildren_Result
of CMlPage
http://maniascript.team-devota.com/stru ... _page.html
    Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

    ManiaControl, FancyManiaLinks
    oliverde8
    Posts: 1286
    Joined: 16 Jun 2010, 07:33
    Location: in a Blue Box

    Re: Invisible ManiaLink element

    Post by oliverde8 »

    hi, thanks a lot, I thought that the hidden element was something of ManiaLib since I tried :
    $this->frameDescription->setHidden(true);
    $this->frameDescription->setAttribute('hidden', '1');

    and they stay visible. Will uses the wml class to hide them. Thanks a lot
    Image
    Developper for The next generation, Clean and Powerfull controller eXpansion for your SM & TM server . Working on eXpansion² with full MP4 support and many other awesome features...
    Post Reply

    Return to “ManiaLink”

    Who is online

    Users browsing this forum: No registered users and 1 guest