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 / INPUT text positioning

Author
Message
Alvind
11
Years of Service
User Offline
Joined: 6th Dec 2007
Location: Northern Ireland
Posted: 21st Dec 2013 22:31
Hi guys is there any way I can place the input typed in by the player on a x/y parameters rather than it appearing in the top left by default?

Deus Ex: Return of Denton
http://www.moddb.com/mods/deus-ex-return-of-denton
MrValentine
AGK Backer
8
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 22nd Dec 2013 00:05
Look at TEXT Ccommand

Phaelax
DBPro Master
16
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 22nd Dec 2013 08:15 Edited at: 22nd Dec 2013 08:15
Text command won't help him if he's using INPUT. For that, Alvin, you can set it's position by using SET CURSOR x, y



MrValentine
AGK Backer
8
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 22nd Dec 2013 09:28
Ah, I was not focussing at the time, my apologies!

Thanks Phaelax!

Alvind
11
Years of Service
User Offline
Joined: 6th Dec 2007
Location: Northern Ireland
Posted: 22nd Dec 2013 13:48
That's exactly what I was after Phaelax TY!

Deus Ex: Return of Denton
http://www.moddb.com/mods/deus-ex-return-of-denton
The Tall Man
5
Years of Service
User Offline
Joined: 16th Nov 2013
Location: Earth
Posted: 22nd Dec 2013 18:05
I haven't used DarkBasic, but I got started with other BASICs. What I would do when I had that need is use the GETCHAR and PRINT commands. With GETCHAR, your income comes one character at a time, and it's up to you to translate it into a number if that's what you need it for, and so on. So if DarkBasic has a GETCHAR or GetKEY or INKEY or something like think. In DarkGDK, there's a dbEntry$ command that might be an alternative to INPUT. Perhaps a DarkBasic version is ENTRY or something like that.

Q: ...you mean computer imagery was still based on the paradigm that the world was flat? Even into the 21st century??? Talk about doing something the hard way!

A: Yep! Back then people would render simple shapes with complex meshes of thousands of flat little triangles. Next to the bottleneck processors they used, it's the main reason why their computers were so slow. In the last days of the religious atmosphere of centralization and trade, corporate dogmas had people believing that flat was faster.
Phaelax
DBPro Master
16
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 24th Dec 2013 04:12
The commands you see in DarkGDK are basically the same name as the DBP commands. So yes there is an entry command if you wish to manually grab and c;lear the input from the buffer.

Libervurto
12
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 1st Jan 2014 16:38 Edited at: 1st Jan 2014 19:17
The command entry$() returns the contents of the keyboard buffer. Input is fine for basic entry but it halts the program, so when you need to get input from the keyboard dynamically you will need to use the keyboard entry buffer.

I wrote this to peek at the entry buffer



Formerly OBese87.

Login to post a reply

Server time is: 2019-04-25 08:12:37
Your offset time is: 2019-04-25 08:12:37