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.

DarkBASIC Discussion / Damn Input!!!! I cant change the font!

Author
Message
Sjakie
21
Years of Service
User Offline
Joined: 17th Dec 2003
Location: Netherlands - Delft
Posted: 6th Mar 2004 09:45
Hey peepz!

Im getting SICK of that stupid Input command! I can't change the font of it!!!!!! Is this possible? Or is DB just really (...)?

Juzt a dude who likez progging - Me loves RTS games
The Dream Keeper!
21
Years of Service
User Offline
Joined: 9th Oct 2003
Location: Netherlands! HOLLAND!
Posted: 6th Mar 2004 10:32
Hey!

From The Netherlands to huh? Haha, funny. O well, you're right.. you can't change the font of the input command. But there is a way around. You can write your own input function using inkey$() and text. That way you can change the font and all. There was a post where somebody posted a code snippet from this function. Try to find that post.

Hope i've helped,

The Dream Keeper!

Bring fun to life!!!!!
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 6th Mar 2004 12:48 Edited at: 6th Mar 2004 12:53
heres the psuedocode for a simple input routine

input_a_line_of_text:

input_string$=""

repeat

get keypress

if keypress = backspace code then input_string$=left$(input_string$,len(input_string$)-1)

if keypress > space and less than capital z then add keypress character to input_string$

repeat <<<<<<<<<<<<<<<<<<<this bit just makes the routine wait until
until keydown=0<<<<<<<<<<<you release the key, otherwise the repeat
-------------------------------------rate would be so fast you would get
-------------------------------------something like ttttteeeeesssttt
-------------------------------------when you typed "test"

text 0,0,input_string$+"_ "

until keypress=returnkey code

return

will work, you can then alter the font you are printing and add other editing options as you wish, if I remember I might run up a snippet and post back to this thread

Mentor.

PC1: P4 hyperthreading 3ghz, 1gig mem, 2x160gig hd`s, ATI radeon 9800 pro gfx, 6 way surround sound, PC2: AMD 1.2ghz, 512mb ram, FX5200 ultra gfx, stereo 16 bit soundblaster, ups.

Login to post a reply

Server time is: 2025-05-23 09:25:45
Your offset time is: 2025-05-23 09:25:45