Page 1 of 1

Invisible ManiaLink element [answered]

Posted: 27 Jan 2014, 19:24
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

Re: Invisible ManiaLink element

Posted: 27 Jan 2014, 19:28
by spaii
<quad id="yourid" class="yourclass" sizen="10 10" posn="0 0 0" hidden="1" />

Re: Invisible ManiaLink element

Posted: 27 Jan 2014, 19:29
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

Re: Invisible ManiaLink element

Posted: 27 Jan 2014, 20:37
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