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.

Dark GDK / How do I input to char []?

Author
Message
helpfull programmer
15
Years of Service
User Offline
Joined: 30th Jul 2009
Location:
Posted: 1st Feb 2010 19:02
hello everyone,

amazing community going here! just puzzled in how to input a char string. so like:

cin >> age;

because I would like to input an IP address in game, to be able to join a server instead of hard coding it in.

thanks in advance!
from helpfullprogrammer
Marsh0
15
Years of Service
User Offline
Joined: 18th Mar 2009
Location:
Posted: 1st Feb 2010 19:17




There is a way to input text and backspace it.

But you basically just use dbGetEntry(); and dbClearEntryBuffer(); to clear the string.

so like ip = dbGetEntry();

ip now has your typed in value.

www.touchofdeathproductions.com
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 1st Feb 2010 19:18 Edited at: 1st Feb 2010 19:23
Have a look at my post dated 17th Nov 2009 21:38 in this thread:

http://forum.thegamecreators.com/?m=forum_view&t=160546&b=22

It contains a function to read keyboard input into character array using Dark GDK commands.

EDIT: Marsh0 posted above the core code of it but in that thread you can see the full function, complete with header.
EDIT: The post before the last, end of thread.
helpfull programmer
15
Years of Service
User Offline
Joined: 30th Jul 2009
Location:
Posted: 3rd Feb 2010 16:15
thank you all so much.... Have made a whole instant messenger using your help

Login to post a reply

Server time is: 2024-10-01 23:26:27
Your offset time is: 2024-10-01 23:26:27