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 / screen size

Author
Message
GZMGames Admin
19
Years of Service
User Offline
Joined: 15th Feb 2005
Location: vermont
Posted: 28th Mar 2005 11:36
full screen im pretty sure is 800x600 right, so what would be right in the middle of it? it's somewhere between 300 and 200 the reason im trying to figure this out is becuase i need the words in the print function right smack in the middle.

Games made with passion
Underworld 1020
20
Years of Service
User Offline
Joined: 2nd Mar 2004
Location: NY, USA
Posted: 28th Mar 2005 12:00 Edited at: 28th Mar 2005 12:02
Well, it doesn't matter what resolution you run your program in, what matters is if the windowed mode is on or not. If you were to put this command "Set Window On" in your code the program would run in windowed mode. If you don't use that command then your program will automatically run in fullscreen mode regardless of the resolution.

But what I think your asking is how do you print text right in the middle of the screen, right? Thats what the "Center Text" command does.

This from the help files:


Let me know if that helps or not .

Oneka
20
Years of Service
User Offline
Joined: 24th Apr 2004
Location: Hampton,VA
Posted: 28th Mar 2005 12:04
I did have a little method I did for this that I didnt you center text because I had to do other things but its like this
(resx/2) - textlength (resy/2) - textlength
and If I remeber correctly it was like that..

Making better games everday!
Oh yeah and just so you know its Oh-nek-a not One-ka!
Dark Flame
19
Years of Service
User Offline
Joined: 15th Feb 2005
Location: England
Posted: 28th Mar 2005 12:50
This is all you need...



GZMGames Admin
19
Years of Service
User Offline
Joined: 15th Feb 2005
Location: vermont
Posted: 28th Mar 2005 13:51
ok but what about the set cursor im trying to get my text like this


set cursor ---,---
print "whatever i want in here"
sleep 2000
cls

on these little marks (---) are the things im trying to get centered and the screen is in full screen but im sure those things above will work just as fine. but im not ganna do it right now cuz im TIRED!

Games made with passion
Soy Cocktail
20
Years of Service
User Offline
Joined: 23rd Dec 2003
Location:
Posted: 28th Mar 2005 14:40
If you want your text in the center then use what Dark Flame posted. The set cursor command will set the spot where the next print statement will put the text. If you put the cursor in the middle the left of the text would begin at that spot. So instead of it being in the center it would start at center and go to the right.

When life hands you lemons go buy some oranges to make orange juice, and stop expecting everything to be given to you.
Dark Flame
19
Years of Service
User Offline
Joined: 15th Feb 2005
Location: England
Posted: 28th Mar 2005 23:18 Edited at: 28th Mar 2005 23:27
Quote: "on these little marks (---) are the things im trying to get centered and the screen is in full screen "


Well just half your resoltution for example...

800x600 half of that would be 400x300 so that would be the centre

so



But if you have long text then you may have to adjust the 1st
co-ordinate.

Hope this helped!

GZMGames Admin
19
Years of Service
User Offline
Joined: 15th Feb 2005
Location: vermont
Posted: 29th Mar 2005 10:59
no that didnt work ill try what you said the first time

Games made with passion

Login to post a reply

Server time is: 2024-09-23 15:26:43
Your offset time is: 2024-09-23 15:26:43