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 Professional Discussion / buffered typing thingymajig

Author
Message
adr
23
Years of Service
User Offline
Joined: 21st May 2003
Location: Job Centre
Posted: 20th Oct 2003 15:41
Supposing I wanted people to be able to type stuff in the game engine (so I'd be using textured plains/sprites to render the text, not the standard input commands)...

While I could easily do the only-do-this-once-while-that-key-is-pressed method, it stops people typing naturally - You can only hit one key at once. Is there a buffered, non-repeating string store somewhere in dbp?

Can I ask you a Question?
What is it?
It's an interrogative form of sentence, used to test knowledge. But that's not important right now.
OSX Using Happy Dude
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 20th Oct 2003 17:37
Just detect a scancode, and if one is detected, (perhaps) convert it to ASCII and then use a sprite to display it.


Avatar & Logo by Indi. Insert witty comment here...
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 20th Oct 2003 21:15
You can get the keyboard buffer (standard text keys only) by using ENTRY$() and clear the buffer down using CLEAR ENTRY BUFFER
adr
23
Years of Service
User Offline
Joined: 21st May 2003
Location: Job Centre
Posted: 22nd Oct 2003 00:31 Edited at: 22nd Oct 2003 00:32
Quote: "Just detect a scancode, and if one is detected, (perhaps) convert it to ASCII and then use a sprite to display it."


But it will output that sprite per sync.

Quote: "You can get the keyboard buffer (standard text keys only) by using ENTRY$() and clear the buffer down using CLEAR ENTRY BUFFER"


Hooray - that's the one

Cheers Mr M.

Can I ask you a Question?
What is it?
It's an interrogative form of sentence, used to test knowledge. But that's not important right now.

Login to post a reply

Server time is: 2026-07-26 05:22:36
Your offset time is: 2026-07-26 05:22:36