Game Development Community

Once again, I need help with GUIBuilder

by Craig Griffiths · in Torque Game Builder · 01/28/2010 (7:15 pm) · 2 replies

I have successfully created my main menu in a separate project then my main game. I couldn't create it in my game because when I started it I wasn't aware of the gui problem in which you had to go into the code and get rid of all those values so you could choose multiple commands rather than the five that showed up. Once you do this you can create a gui properly after you've fixed this, it won't work with any projects you created pre gui fix. So that's why the menu was created elsewhere. I thought it would be easy to just copy and paste the file along with the images into my game; when nothing was showing up I figured it was because of this. I created a new project and got everything working; once again I tried the gui with the same result. Why can I not just copy and paste the gui file with the images into my gui folder and it work properly. Before you suggest just making the gui over again, on the mac it won't let me load images at all so I have to manually type the location for each image and on the mac and pc whenever I try to make the images local they get shot over in a completely different direction which just causes so much frustration and time to create a simple menu. Long story short any reason why a working gui in one project won't work in a different project.

#1
01/28/2010 (8:30 pm)
In your new project, are you making sure to exec() your gui file?
#2
01/28/2010 (9:38 pm)
I'm doing this exec("./MenuCommands.cs"); in game.cs and inside that is this
moveMap.bindCmd(keyboard, "m", TurtleMenu @ ".toggleMenu();", "");
// toggle the main menu
function TurtleMenu::toggleMenu(%this)
{
   if(!%this.isAwake())
   {
      Canvas.pushDialog(%this);
   }
   else
   {
      Canvas.popDialog(%this);
   }
}
Am I missing something?