Problem here at n00b central"Canvas.setContent(myGui);
by Tim W. Cress · in Torque Game Engine · 11/01/2003 (9:23 pm) · 8 replies
Hi,
Things have been going well till this problem.
I am following the Tourniquet Gui tutorial.Everything is cool till I try to call my gui from the console.The code that is
given seems to be obsolete.To test a gui it says in the console to call this, exec("fps/client/ui/myGui.gui");
then type, Canvas.setContent(myGui);
I think I got the first command to work by typing this,
exec("demo/client/ui/myGui.gui"); it then says it was compiled
and so on.
But when I type Canvas.setContent(myGui);
I get this error, Invalid control:myGui
I also tried to call my gui to the screen with this,
initCanvas(%myGui.gui) and get this error,
cCreate Canvas: canvas has already been instantiated
Thankyou for your time and patience,
Tim
Things have been going well till this problem.
I am following the Tourniquet Gui tutorial.Everything is cool till I try to call my gui from the console.The code that is
given seems to be obsolete.To test a gui it says in the console to call this, exec("fps/client/ui/myGui.gui");
then type, Canvas.setContent(myGui);
I think I got the first command to work by typing this,
exec("demo/client/ui/myGui.gui"); it then says it was compiled
and so on.
But when I type Canvas.setContent(myGui);
I get this error, Invalid control:myGui
I also tried to call my gui to the screen with this,
initCanvas(%myGui.gui) and get this error,
cCreate Canvas: canvas has already been instantiated
Thankyou for your time and patience,
Tim
#2
I have read many of your posts and learned from the
information you have shared "thankyou"
I guess my question should have been more clear.
How do I call myGui.gui on the console?
I have tried many combinations and gone through the forums
to get this command,even the createCanvas from "ConsoleDoc"
gave me the error "error cCreateCanvas:canvas has already been instantiated"
Thankyou for your time,From n00b World
Tim
11/03/2003 (5:48 am)
Hi Devon,I have read many of your posts and learned from the
information you have shared "thankyou"
I guess my question should have been more clear.
How do I call myGui.gui on the console?
I have tried many combinations and gone through the forums
to get this command,even the createCanvas from "ConsoleDoc"
gave me the error "error cCreateCanvas:canvas has already been instantiated"
Thankyou for your time,From n00b World
Tim
#3
11/03/2003 (7:07 am)
@Tim: make sure the gui is actually called myGui in the .gui file, it should be the name between parentheses in the first block, normally a GuiControl.
#4
The gremlins here at Noob Central are back on track.
I had just came back to say I had found the problem and Mr.Amado
has spelled out exactly what my problem was.Good job
and "thankyou sir"
I will spell out briefly what the problem and the solution was
for the gui tutorial in the Tourniquet.
It took me over 20 hours to figure it out so
mabey someone else can use the info.
The way the gui is layed out as of 10/1/03,when I downloaded
the current head.
I followed the tut to add a background to the Main menu Gui.
I saved it as myGui.gui,it was automaticly saved to my
"demo/client/ui" file as myGui.Inside it says GuiChunkedBitmapCtrl(MainMenuGui),this is what Mr. Xavier was earlier telling me to look for.Again "thankyou Xavier".
Also a sidenote to the Tourniquet,I saved my bitmap to
"demo/client/ui" .
Then to test my background in the console,type this
exec("demo/client/ui/myGui.gui"); hit enter
then type Canvas.setContent(MainMenuGui);
hopfully this will help.And so long from n00b central,
Tim
11/03/2003 (8:06 am)
Well,The gremlins here at Noob Central are back on track.
I had just came back to say I had found the problem and Mr.Amado
has spelled out exactly what my problem was.Good job
and "thankyou sir"
I will spell out briefly what the problem and the solution was
for the gui tutorial in the Tourniquet.
It took me over 20 hours to figure it out so
mabey someone else can use the info.
The way the gui is layed out as of 10/1/03,when I downloaded
the current head.
I followed the tut to add a background to the Main menu Gui.
I saved it as myGui.gui,it was automaticly saved to my
"demo/client/ui" file as myGui.Inside it says GuiChunkedBitmapCtrl(MainMenuGui),this is what Mr. Xavier was earlier telling me to look for.Again "thankyou Xavier".
Also a sidenote to the Tourniquet,I saved my bitmap to
"demo/client/ui" .
Then to test my background in the console,type this
exec("demo/client/ui/myGui.gui"); hit enter
then type Canvas.setContent(MainMenuGui);
hopfully this will help.And so long from n00b central,
Tim
#5
11/03/2003 (3:31 pm)
No problem.
#6
11/04/2003 (6:46 pm)
After I finish the scripting tutorial, I'll be revisting Tourniquet 1 and compiling both the newbie guide and scripting guide into a book. >:) I'll fix up that problem then
#7
I just wanted to thank you for the Tourniquet.I am very
new to game development.The Torque environment is constantly
evolving so most documents have a problem here or there.The
Tourniquet at least helps a n00b like me get started.
"Thanks Dude"
Tim
11/05/2003 (6:23 pm)
Hi Devon,I just wanted to thank you for the Tourniquet.I am very
new to game development.The Torque environment is constantly
evolving so most documents have a problem here or there.The
Tourniquet at least helps a n00b like me get started.
"Thanks Dude"
Tim
#8
I'm glad it helped. Hopefully it'll help people make some kick arse games ;.)
11/07/2003 (12:04 am)
NP Tim,I'm glad it helped. Hopefully it'll help people make some kick arse games ;.)
Torque Owner Devon Ly
With the newest version of Torque the directory structure has been changed. The guide does not reflect all of the changes that have taken place in the newest versions.