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 Question

Author
Message
RisTar_sn
19
Years of Service
User Offline
Joined: 15th Jan 2005
Location:
Posted: 8th Mar 2006 19:59
I want to print text using the text command and then to use the input command to get the input into a variable but when i use the center text and then the input the text is right on place but the user input shown on the top left screen , how can i use the input command in the same sentance as the text ??
The Nerd
20
Years of Service
User Offline
Joined: 5th Jun 2004
Location: Denmark
Posted: 8th Mar 2006 20:38
This one works out:


-The Nerd

CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 8th Mar 2006 23:08
or set some vars and reuse them throughout your code:

Quote: "

iCenterX As Integer = screen width / 2
iCenterY As Integer = screen height / 2

set cursor iCenterX,iCenterY
input "Your name: ",name$
text iCenterX,iCenterY + 50,name$
wait key

"


instead of embedding the function call everywhere you need x/y centers

FREE Automatic file updates for your distributed Games and Apps - see Program Announcements Forum - DBP Demo

Login to post a reply

Server time is: 2024-09-24 17:42:38
Your offset time is: 2024-09-24 17:42:38