Big dumb question about menu/GUI
by Jason McIntosh · in Torque Game Builder · 02/28/2005 (4:45 am) · 7 replies
Just curious... how do I get rid of the menu bar when I run T2D? :o Do I need to specify a GUI? (I'm using a batch file with the -mod switch, if it matters.)
About the author
#2
You can do this in the GUI editor although I feel that you learn more by doing it "manually". To do it manually, do the following...
If you were to do this in the main SDK gui screen, do the following...
- Open the file "mainScreenGui.gui".
- Delete all the code after the line "//--- OBJECT WRITE END ---" ( be careful not to delete this line ).
- Remove the "mainScreenMenu" GUI control from the list of GUI elements....
therefore remove the following block....
so you're left with only the following code in the whole file...
Now just make sure that you go into the GUI editor (F10) and add a button with "quit();" or alternatively you can drop-down the console (tilde key ~) and just type "quit();".
Sorry if you know half this stuff Jason, just trying to overstate for those who might not.
Good Luck.
- Melv.
02/28/2005 (5:19 am)
@Jason: It's very easy to do this but before you do, just make sure you've got a button or a key-binding that issues a "quit();" so that you can get out of the engine!You can do this in the GUI editor although I feel that you learn more by doing it "manually". To do it manually, do the following...
If you were to do this in the main SDK gui screen, do the following...
- Open the file "mainScreenGui.gui".
- Delete all the code after the line "//--- OBJECT WRITE END ---" ( be careful not to delete this line ).
- Remove the "mainScreenMenu" GUI control from the list of GUI elements....
therefore remove the following block....
new GuiMenuBar(mainScreenMenu) {
profile = "GuiMenuBarProfile";
horizSizing = "width";
vertSizing = "bottom";
position = "0 0";
extent = "640 22";
minExtent = "8 2";
visible = "1";
};so you're left with only the following code in the whole file...
//--- OBJECT WRITE BEGIN ---
new GuiChunkedBitmapCtrl(mainScreenGui) {
profile = "GuiContentProfile";
horizSizing = "width";
vertSizing = "height";
position = "0 0";
extent = "640 480";
minExtent = "8 8";
visible = "1";
bitmap = "./images/background";
useVariable = "0";
tile = "0";
new fxSceneWindow2D(sceneWindow2D) {
profile = "GuiContentProfile";
horizSizing = "width";
vertSizing = "height";
position = "0 0";
extent = "640 480";
minExtent = "8 8";
visible = "1";
lockMouse = "0";
};
};
//--- OBJECT WRITE END ---Now just make sure that you go into the GUI editor (F10) and add a button with "quit();" or alternatively you can drop-down the console (tilde key ~) and just type "quit();".
Sorry if you know half this stuff Jason, just trying to overstate for those who might not.
Good Luck.
- Melv.
#3
I guess you can't have too much help. :)
- Melv.
02/28/2005 (5:20 am)
Josh, stop following me around! Or is it me following you around?I guess you can't have too much help. :)
- Melv.
#4
And go get some work done or something! :P
02/28/2005 (5:30 am)
I think I just needed to know where to start looking. Thanks to both of you.And go get some work done or something! :P
#5
It's a good thing when customers tell you to stop helping them. :)
... okay okay, I'm going back to work now. ;)
- Melv.
02/28/2005 (5:39 am)
Hey hey...It's a good thing when customers tell you to stop helping them. :)
... okay okay, I'm going back to work now. ;)
- Melv.
#6
02/28/2005 (5:54 am)
I hope you know I totally appreciate your time and effort. The level of support for this product is outrageous and wonderful. Keep on kicking tooshie (not my first choice of words, but there might be folk about with innocent ears).
#7
It's hard work but I feel very necessary at the moment.
- Melv.
02/28/2005 (6:17 am)
Thanks, I appreciate that.It's hard work but I feel very necessary at the moment.
- Melv.
Torque Owner Josh Williams
Default Studio Name
If you want to get rid of the launch and exit screens, that's also easy.
In example/spacescroller/main.cs, note that the T2D_SPACESCROLLER package onStart() function calls another function.. loadStartup(). This function is defined in splashScreen.gui. Reading the code in this script, you'll see that what you really want to do instead of having a loadStartup() function in /spacescroller.main.cs is instead call InitialiseClient() and make the call to Canvas.setContent(spaceScrollerScreen). Then just delete the extraneous GUI definitionss from the .gui files and you're done.
I'm expecting that this will all be pretty clear when you take a look at the code, but let us know if you have problems, and one of us will write-up a more detailed explanation or just provide the code. :)