PDA

View Full Version : wa2_vischange


Bizzeh
23rd March 2002, 12:03
#include "lib/std.mi"

Global Layout MainNorm, MainShade;
Global GUIObject VisMain, VisShade;


System.onScriptLoaded()
{

MainNorm = getContainer("main").getlayout("normal");
MainShade = getContainer("main").getlayout("shade");

VisMain = MainNorm.getObject("vis");
VisShade = MainShade.getObject("vis_shade");

}

i wanna be able to do somthin like

vismain.onsetmode()
{
vis_shade.setmode(vismain.getmode);
}

visshade.onsetmode()
{
vis_main.setmode(visshade.getmode);
}



is it possible to do this...

sirchess
23rd March 2002, 13:14
should work...except unfortunately there's no vis.onSetMode(). You could use vis.onLeftButtonUp(), but if the user right-clicked and used a menu it would screw it up...

...which leaves a timer as your main option. That creates another problem, though...there's no way of knowing which vis was set by the user, and which needs to be changed by the script....your timer needs to be able to differentiate between the two.

Maybe Gonzo or will can think of something fancy for you...I'm out of ideas :cry:

Gonzotek
23rd March 2002, 13:23
Stick a transparent layer over both a the big and little vis's and use that to change between the different modes. The you can have your own right-click menu and a left-click modechange and handle the mode changes inside of the script.

-=Gonzote=-

Bizzeh
23rd March 2002, 13:29
thanks guys... could 1 of you give me an example in .m please so i can see exactly what you mean...

or edit in to the converter yourselfs... or give me (im dumb so i need exact) instructions what to do

thanks...:D