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 after sprite command

Author
Message
jayell leedham
18
Years of Service
User Offline
Joined: 24th Jan 2006
Location: North Yorkshire
Posted: 17th Mar 2008 13:26
load image "ladybird.bmp",1
sprite 1,200,200,1
set cursor 10,100
input "What is your name?", name$

input doesn't show "What is your name".
How can I make it behave please anyone!
pcRaider
17
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 17th Mar 2008 13:41 Edited at: 17th Mar 2008 13:51
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 17th Mar 2008 22:27
Also, is your program all 2D/text? If so, you may not even need sprites (which initialise the 3D system and is the reason your Input isn't seen).

You could just paste the image on the screen instead of turning it into a sprite.

TDK_Man

jayell leedham
18
Years of Service
User Offline
Joined: 24th Jan 2006
Location: North Yorkshire
Posted: 23rd Mar 2008 20:09
I eventually got inpt working by:-
load image "ladybird.bmp",1
sprite 1,200,200,1
set cursor 10,100

name$=MyInput("Name? ")

using function:-
Function MyInput(input$)
clear entry buffer
Do
Input2$=Entry$(1)
Text 100,300,input$+input2$
If returnkey() and ret=0 then exit
If returnkey()=0 then ret=0
sync
Loop
Endfunction input2$
with acknowledgements to Roxas
jayell leedham
18
Years of Service
User Offline
Joined: 24th Jan 2006
Location: North Yorkshire
Posted: 11th Apr 2008 13:02
Beware! the function MyInput(input$) works fine, BUT remember that on leaving the function the return character is appended to the end of the returned string, and may play havoc with your following code!
I spent hours before finding this out.......
You can of course remove the character by "name$=left$(name$,len(name$)-1)".

Login to post a reply

Server time is: 2024-11-15 18:04:30
Your offset time is: 2024-11-15 18:04:30