Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / how do i center a window?

Author
Message
Monzi
20
Years of Service
User Offline
Joined: 10th May 2004
Location: Denmark
Posted: 9th Jun 2004 15:34
is there any way i can center my gamewindow? on the screen?
Monzi
20
Years of Service
User Offline
Joined: 10th May 2004
Location: Denmark
Posted: 9th Jun 2004 15:42
set window on
set window size 800,600
set display mode 800,600,32
set window position (screen width()-800)/2, (screen height()-600)/2

this is what i figured out myself
but the window is still positioned on the topleft corner of the screen.. why is that?
Monzi
20
Years of Service
User Offline
Joined: 10th May 2004
Location: Denmark
Posted: 9th Jun 2004 16:59
eeeh .. i'm stupid .. hehe
found out that the window centers itself

Login to post a reply

Server time is: 2024-09-22 12:22:17
Your offset time is: 2024-09-22 12:22:17