Click() function becomes disabled
by Ritchey "Hawk" Mulhollem · in Torque Game Engine · 09/09/2004 (3:51 pm) · 3 replies
I am fading in and out a bunch of screens and want it to pause at the last screen until the user hits a key. The click() function works fine until the canvas is set to another control. I am having to do it this way because setting intro.fadeOut to 0 or -1 has no effect. However, when IntroLast is called (intro.screen==4), the click() function stops responding leaving the entire screen locked up.
Ideas??
Ideas??
function Intro::onWake(){Intro.done = 0;IntroDone();}
function Intro::click(){Canvas.setContent( MainMenu );}
new GuiFadeinBitmapCtrl(Intro) {
profile = "GuiInputCtrlProfile";
bitmap = "./images/intro";
etc....
};
new GuiChunkedBitmapCtrl(introLast) {
profile = "GuiContentProfile";
bitmap = "./images/intro4";
etc...
};
function IntroDone(){
if(intro.done){
intro.done=0;
intro.screen++;
intro.bitmap="./images/intro"@intro.screen;
Canvas.setContent( intro );
}
if (intro.screen ==4){intro.visible="0";Canvas.setContent( introLast );}//hold loop until click
else
schedule(1000, 0, IntroDone);
}
#2
Do you have a complete list of objects and their methods?
I have some of them listed in Kenneth Finney's book, but much like his book it is incomplete. "moving right along..."
09/09/2004 (5:31 pm)
Ah! So what you are saying is that click() is a method of GuiFadeinBitmap and not Intro.gui !! Then that's why it doesn't work. GuiChunkedBitmapCtrl must not have a click() method because I tried introLast::click() and it did not work either.Do you have a complete list of objects and their methods?
I have some of them listed in Kenneth Finney's book, but much like his book it is incomplete. "moving right along..."
#3
If you want to see when callbacks occur, I suggest grepping the source of the components (and their parent classes) that you're interested in for Con::exec. You should be able to rapidly determine what events result in callbacks from the results of that search.
09/11/2004 (7:58 am)
There's no convenient way to get such a list. Callbacks are implement with calls to Con::exec. So, no, I don't. If you want to find all the methods and fields for an object, just call .dump() on it. This is far superior to a seperate list because it always matches the reality of the codebase you're working with.If you want to see when callbacks occur, I suggest grepping the source of the components (and their parent classes) that you're interested in for Con::exec. You should be able to rapidly determine what events result in callbacks from the results of that search.
Associate Kyle Carter