Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
0 registered members (), 1,012 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
User input #290528
09/19/09 17:12
09/19/09 17:12
Joined: Aug 2009
Posts: 19
D
Dominator Offline OP
Newbie
Dominator  Offline OP
Newbie
D

Joined: Aug 2009
Posts: 19
For my game I want the players to input their names. I was wondering how you are suppose to get the input?

Re: User input [Re: Dominator] #290529
09/19/09 17:13
09/19/09 17:13
Joined: Oct 2007
Posts: 5,209
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,209
İstanbul, Turkey
inkey


3333333333
Re: User input [Re: Quad] #291025
09/23/09 02:39
09/23/09 02:39
Joined: Aug 2009
Posts: 19
D
Dominator Offline OP
Newbie
Dominator  Offline OP
Newbie
D

Joined: Aug 2009
Posts: 19
I know the function to get user input is inkey.
The question I have is where does the user input it on the screen.

The first thing I tried was putting the inkey into my program. However, when I did this I couldn't see the cursor waiting for the input.

I hope this makes it more clear as to what my problem is.

Re: User input [Re: Dominator] #291029
09/23/09 04:05
09/23/09 04:05
Joined: Jul 2008
Posts: 553
Singapore
delinkx Offline
User
delinkx  Offline
User

Joined: Jul 2008
Posts: 553
Singapore
inkey only reads the input. u will need to display the text there on screen as and when it is read.

it wont display automatically. u need to display it yourself.


A7 commercial Team / VC++ 2008 Pro
homepage | twitter | facebook
Re: User input [Re: delinkx] #291039
09/23/09 05:54
09/23/09 05:54
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
To give a few more details:
inkey reads the keyboard input and writes it into a string, thus you first need a string for your user input.
Then create a text object to display that string.
When the user is supposed to enter something:
1. switch the text visible (you might want to clear the string also)
2. call inkey with the string as parameter
3. handle the abort values (explained in the manual) of the inkey function to process the string further or to get on with the application


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1