Here are the traffic lights for my Ogre Application:
And the traffic lights from Xcode (and pretty much every other OSX application):
How do I enable the minimize and close buttons?
Cocoa Ogre::RenderWindow doesn't have a close button?
-
- Halfling
- Posts: 64
- Joined: Sun Aug 19, 2012 9:42 pm
- Location: Hampshire, United Kingdom
- masterfalcon
- OGRE Team Member
- Posts: 4270
- Joined: Sun Feb 25, 2007 4:56 am
- Location: Bloomington, MN
- x 126
- Contact:
-
- OGRE Retired Team Member
- Posts: 972
- Joined: Mon Jun 02, 2008 6:52 pm
- Location: Berlin
- x 65
Re: Cocoa Ogre::RenderWindow doesn't have a close button?
Well, it seems we have a bug in the URL BBCode...
I'd blame the Apple doc, though. Who creates weird URLs like those?
I removed the url tags completely from your post and actually you have posted the same link twice
And then I noticed removing the tags completely screws up the link, guess that's why you put em there in the first place. Haha...
I'd blame the Apple doc, though. Who creates weird URLs like those?
I removed the url tags completely from your post and actually you have posted the same link twice
And then I noticed removing the tags completely screws up the link, guess that's why you put em there in the first place. Haha...
-
- Halfling
- Posts: 64
- Joined: Sun Aug 19, 2012 9:42 pm
- Location: Hampshire, United Kingdom
Re: Cocoa Ogre::RenderWindow doesn't have a close button?
Err, so how do i use those masks?masterfalcon wrote:Here ya go.
https://developer.apple.com/library/mac ... TP40004151
Style masks listed here:
https://developer.apple.com/library/mac ... TP40004151
[edit]
what happened to the links?
- masterfalcon
- OGRE Team Member
- Posts: 4270
- Joined: Sun Feb 25, 2007 4:56 am
- Location: Bloomington, MN
- x 126
- Contact:
Re: Cocoa Ogre::RenderWindow doesn't have a close button?
You can just OR them together for the features that you like. Or are you asking for more than that?
- masterfalcon
- OGRE Team Member
- Posts: 4270
- Joined: Sun Feb 25, 2007 4:56 am
- Location: Bloomington, MN
- x 126
- Contact:
Re: Cocoa Ogre::RenderWindow doesn't have a close button?
You can just OR them together for the features that you like. Or are you asking for more than that?
-
- Halfling
- Posts: 64
- Joined: Sun Aug 19, 2012 9:42 pm
- Location: Hampshire, United Kingdom
Re: Cocoa Ogre::RenderWindow doesn't have a close button?
Double post? Anyways, I got it working with this code:masterfalcon wrote:You can just OR them together for the features that you like. Or are you asking for more than that?
Code: Select all
NSWindow *mainOgreWindow = [[NSApp windows] objectAtIndex:0];
[[mainOgreWindow standardWindowButton:NSWindowCloseButton] setEnabled:TRUE];
[[mainOgreWindow standardWindowButton:NSWindowMiniaturizeButton] setEnabled:TRUE];
But it works .
-
- Greenskin
- Posts: 126
- Joined: Thu Jun 05, 2008 3:26 am
- Location: Thames, New Zealand
- x 9
Re: Cocoa Ogre::RenderWindow doesn't have a close button?
Is there a way to do this from the Ogre API? I'm guessing not, in which case, how does one create the window in such a way that the flags can be set?masterfalcon wrote:You can just OR them together for the features that you like. Or are you asking for more than that?
- masterfalcon
- OGRE Team Member
- Posts: 4270
- Joined: Sun Feb 25, 2007 4:56 am
- Location: Bloomington, MN
- x 126
- Contact:
Re: Cocoa Ogre::RenderWindow doesn't have a close button?
It shouldn't be too terribly difficult. Something like this perhaps, assuming that you already have a pointer to your render window.
Note that since this uses Objective-C API's this should be in a .mm file.
Code: Select all
NSWindow *winHandle = NULL
mWindow->getCustomAttribute("WINDOW", &winHandle);
[[winHandle standardWindowButton:NSWindowCloseButton] setEnabled:TRUE];
[[winHandle standardWindowButton:NSWindowMiniaturizeButton] setEnabled:TRUE];