Mac Window
by Scott Doerrfeld · in Torque Game Engine · 01/16/2008 (2:13 pm) · 5 replies
I want to get rid of the green "Maximize" (aka "Zoom") button on the Torque window. Or at least deactivate it. I just can't seem to find where in the Torque SDK I can control what gets displayed on the Mac window.
Also, sometimes I am not able to minimize the window. For example, if I start up the program in full screen then switch to windowed mode, it will sometimes not let me minimize.
Any advice here??
Also, sometimes I am not able to minimize the window. For example, if I start up the program in full screen then switch to windowed mode, it will sometimes not let me minimize.
Any advice here??
About the author
#2
01/28/2008 (7:02 am)
You would think so, but it's not (as far as I can tell). I can't even find a .nib or any kind of interface file!
#3
01/28/2008 (7:50 am)
Carbon is a bit different than Cocoa when it comes to creating interfaces (e.g., no nibs). You'll be wanting to look at the Carbon Window Manager Reference, specifically at the constants. Torque's default window attributes are kWindowStandardDocumentAttributes | kWindowStandardHandlerAttributes (take a look at line 54 in macCarbWindow.cc).
#4
const U32 kTDefaultWindowAttrs = kWindowStandardDocumentAttributes | kWindowStandardHandlerAttribute;
To this...
const U32 kTDefaultWindowAttrs = kWindowStandardFloatingAttributes | kWindowStandardHandlerAttribute;
Then recompile and the zoom box will be deactivated.
08/02/2008 (4:26 pm)
Figured this out with help from this post and Alex directly. Here's what you do, change this line in macCarbWindow.cc (it's line 60 as of TGB 1.7.2).const U32 kTDefaultWindowAttrs = kWindowStandardDocumentAttributes | kWindowStandardHandlerAttribute;
To this...
const U32 kTDefaultWindowAttrs = kWindowStandardFloatingAttributes | kWindowStandardHandlerAttribute;
Then recompile and the zoom box will be deactivated.
#5
08/03/2008 (3:46 am)
Thanks, this is useful for my own projects.
Associate David Montgomery-Blake
David MontgomeryBlake