View Single Post
Old 9th January 2003, 02:18   #20
RephaiM
Senior Member
 
RephaiM's Avatar
 
Join Date: Jan 2003
Location: Bloomsburg, PA
Posts: 100
Send a message via ICQ to RephaiM Send a message via AIM to RephaiM
I never was good with C++... Tell me what doesn't look right here...

code:

//------------------------------------------------------------------------
// ldwr.m
//
// controls left drawer sliding
//
//------------------------------------------------------------------------

#include "../../../lib/std.mi"

Global Container MainContainer;
Global Layout NormalLayout;
Global Group Drawer;
Global Button buttonback;
Global Int B;

System.onScriptLoaded() {
MainContainer = getContainer("main");
Layout NormalLayout = System.getContainer("main").getLayout("normal");

Drawer = NormalLayout.getObject("ldrawer");
buttonback = Drawer.getobject("ldwr.back");

B = 0;

}

buttonback.onLeftClick() {
if (B == 0) {
B = 1;
Drawer.setTargetX(0);
Drawer.setTargetSpeed(0.33);
Drawer.gotoTarget();
}
}

Drawer.onTargetReached() {
if (B == 1) {
buttonback.setTargetX(0);
buttonback.setTargetSpeed(0.33);
buttonback.gotoTarget();
}
}



It compiles as it is but I get an error (black and red box at the top of the screen) when I reload the skin with it.
RephaiM is offline   Reply With Quote