Designing a better framework
Right, I think it is using the 2/3rds rule or "visually centered" as recommended in the Apple Human Interface Guidelines:
[url="http://developer.apple.com/documentation/UserExperience/Conceptual/OSXHIGuidelines/XHIGWindows/chapter_17_section_4.html#//apple_ref/doc/uid/20000961-BACFHDHE"]
Apple Human Interface Guidelines: Window Behavior - Positioning Windows[/url]
[url="http://developer.apple.com/documentation/UserExperience/Conceptual/OSXHIGuidelines/XHIGWindows/chapter_17_section_4.html#//apple_ref/doc/uid/20000961-BACFHDHE"]
Apple Human Interface Guidelines: Window Behavior - Positioning Windows[/url]
"centered" on Mac OS X means "the alert position" usually, which is slightly above centered vertically. This is correct behavior!
OneSadCookie Wrote:"centered" on Mac OS X means "the alert position" usually, which is slightly above centered vertically. This is correct behavior!I'm making a game, not an alert screen. For example, Halo shows up in the center of the screen, as do all the various apps I use (and the loading screens for UT2k3 and CoD2). I'm used to having the game screens centered, and I'd like to replicate it for my own games.
... and I prefer having the window in the correct place 
Stop wasting your time worrying about it

Stop wasting your time worrying about it
OneSadCookie Wrote:... and I prefer having the window in the correct placeYou prefer it at the top of the screen because new Finder windows appear in that position. I prefer it in the center because all the games on my computer appear in that position. I wonder which one is more relevant here.
Default or Expected behaviour wins, go with it.
Sir, e^iπ + 1 = 0, hence God exists; reply!
Well, you can always tweak the SDL source to get the exact behavior you want. Or, use a horrible hack like:
Add it before you create your surface "0,0" being "bottom,left" corner position relative to the bottom left of your screen.
(warning: just found a getenv("SDL_VIDEO_WINDOW_POS") in SDL source thanks to spotlight, might break things - I didn't test this other than to verify it changed the starting position of the main window)
Code:
setenv("SDL_VIDEO_WINDOW_POS","0,0",1);(warning: just found a getenv("SDL_VIDEO_WINDOW_POS") in SDL source thanks to spotlight, might break things - I didn't test this other than to verify it changed the starting position of the main window)
Wow! The stubborn window finally moved to the middle of the screen! Unfortunately it has a weird side effect, which is that the video itself shifts up and to the right the same amount as the window moved from (0, 0). Here's what I mean:
![[Image: SDL_video.png]](http://waterfallsw.com/~mike/SDL_video.png)
Really promising except for the glitch!
![[Image: SDL_video.png]](http://waterfallsw.com/~mike/SDL_video.png)
Really promising except for the glitch!
imikedaman Wrote:For example, Halo shows up in the center of the screen...Halo also doesn't properly capture the screen or the mouse, which means you can exposé the game window in fullscreen mode - Joy! Moral of this is to do what's right, not what other people do - unless their right

That said my current engine doesn't do the two-thirds thing either - it's centred plus a nudge upward - but that's mostly 'cause I'm lazy and haven't fixed it yet.
Both Cocoa and Carbon have simple routines to put the window in the right place
OneSadCookie Wrote:Both Cocoa and Carbon have simple routines to put the window in the right placeYes, I already tried a few ideas and listed them on the first page. I was trying to get a window reference and move the window that way, but needed help figuring out how since my ideas failed.
Code:
[[NSApp mainWindow] center]but you've already said that SDL's doing that for you (it should be) and you don't want it to (you should).
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Designing a 2D game... | Canter | 2 | 2,429 |
Feb 17, 2007 10:45 PM Last Post: AnotherJake |
|

