Thread: MAKI Cheats
View Single Post
Old 16th December 2002, 21:26   #217
Junior Member
Thrasher's Avatar
Join Date: Dec 2002
Location: Campbell, California
Posts: 11
Send a message via AIM to Thrasher Send a message via Yahoo to Thrasher
Re: Re: Drawer

Originally posted by Thrasher

I have a toggle button and want it to control an EQ drawer. I need to implement the following functionality....
I modified drawer.m ... I defined a button variable and found it in the script (EqBtn) then

// Find button in main group
EqBtnGrp = getScriptGroup().getParentLayout().getObject("main");
EqBtn1 = EqBtnGrp.getObject("eqBtn1");
// Define function to handle the click
EqBtn1.onLeftButtonUp(int x,int y) {
// if toggle button
// Insert toggle code here
// Open/Close Drawer

One thing to watch out for. If you load your drawer group in your conatiner definition before you load the main group and drawer.maki is defined in the drawer group, the script won't see it... I had to change the script and point DrawerGrp to


DrawerGrp = getScriptGroup().getParentLayout().getObject("player.main.eq");

Then I declared the script after all three groups.

To toggle the button when the drawer is closed I added the following line to Drawer.onLeftButtonUp open and close sections respectively.


// open


// close

Anything I forgot? This seems to work perfectly. Thanks again frisbeemonkey for the original drawer script. i couldn't have started scripting without your help.

Last edited by Thrasher; 16th December 2002 at 23:52.
Thrasher is offline   Reply With Quote