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 / (DBC) placing text

Author
Message
Eray
19
Years of Service
User Offline
Joined: 26th Apr 2005
Location: United Kingdom
Posted: 27th Apr 2006 20:13
Hello,
it sounds like such a noobish Q thats why i put it in here but i cant for the life of me work out how to place text. so i can place it in the middle of the screen, any ideas ?

Thanks

Post Quick please,Eray
The Nerd
20
Years of Service
User Offline
Joined: 5th Jun 2004
Location: Denmark
Posted: 27th Apr 2006 20:36 Edited at: 27th Apr 2006 20:38


The "screen width()/2" and "screen height()/2" is the text position(x,y) Replace it with any values you want. The source code above will place the text just around the middle... Not totally in the middle though

Cheers,

The Nerd

3D Arcade-like game:
SpaceBattle-Shootout
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 27th Apr 2006 22:04
can't remember (i have dbpro now) but doesn't 'center text screen width()/2,screen height()/2,"text here"' work?

or how about the text width command? (i.e. minus the text width from the x position).

life's one big game
spec= 2ghz, 1gb ram, 512mb gpu, directx 9.0c, dbpro and classic
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 27th Apr 2006 22:04
can't remember (i have dbpro now) but doesn't 'center text screen width()/2,screen height()/2,"text here"' work?

of how about the text width command? (i.e. minus the text width from the x position).

life's one big game
spec= 2ghz, 1gb ram, 512mb gpu, directx 9.0c, dbpro and classic
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 27th Apr 2006 22:19 Edited at: 27th Apr 2006 22:20


<EDIT> Just saw abov epost, not sure how I missed that... anyways yeah.

Also Eray, youll find you get less answers when you rush people.

tiffer
18
Years of Service
User Offline
Joined: 6th Apr 2006
Location: Scotland
Posted: 27th Apr 2006 23:10
when your placing text rather than using set cursor and print, if you want it perfect use center text "string",screen width()/2,screen height()/2

They have the internet on computers now
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 28th Apr 2006 01:38
Uh...

Eray
19
Years of Service
User Offline
Joined: 26th Apr 2005
Location: United Kingdom
Posted: 28th Apr 2006 18:35
hello,

sorry for the late post....got side tracked, thanks all of you, ive now placed my text where i wanted it....and also....the background for the text is coming up black...but i want it to be white or transparnet, i did find this line of code
but it dont work, wever im not placing it in the right place or it just need somthing else any one help ?

That was the last text Question, Eray
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 30th Apr 2006 16:40
Set Text Transparent

... makes the text transparent and

Set Text Opaque

... makes the background of the text whatever colour you set in the INK Foreground,Background command - regardless of the screen colour behind it.

TDK_Man

Login to post a reply

Server time is: 2024-09-24 21:28:16
Your offset time is: 2024-09-24 21:28:16