Hi All,
Taken some ones code and made it work with a blinking cursor and also having 3d object on screen as well.
If recognize your chip in.
Rem Project: input with object
Rem Created: 26/03/2006 09:50:33
Rem ***** Main Source File *****
sync on : sync rate 0 :
backdrop on
color backdrop rgb(0,0,0) : hide mouse
set text font "arial" : set text size 14 : set text transparent
global i olds$
autocam off
position camera 0,0,0,-180
make object cube 1,50
position object 1,0,0,0
do
set cursor 100,20
text 0,100, olds$
s$ = textbox(100,100,20)
olds$=s$
loop
end
function textbox(x as integer,y as integer, maxchrs as integer)
local out as string : local last_key as integer
clear entry buffer
repeat
rem showing last input
text 200,0 ,"You typed in this last time :>"+olds$
rem background box for input
box x-5,y-5,x+(maxchrs*text width("W")),y+(text height("8")*1.5),RGB(182,182,182),RGB(182,182,182),RGB(182,182,182),RGB(182,182,182)
out = out + strip(entry$())
if len(out)>maxchrs then out=left$(out,len(out)-1)
clear entry buffer
`backspace
if scancode() = 14 and last_key <> 14
if len(out) > 0
out = left$(out,len(out)-1)
endif
else
endif
last_key = scancode()
if val(mid$(str$(timer()),5))>5
text x,y,out+"_"
else
text x,y,out
endif
text 0,0,"chrs enterd="+str$(len(out))
text 0,10,"screen fps="+str$(screen fps())
showobj()
sync
until returnkey()
repeat : until returnkey() = 0
endfunction out
function strip(in as string)
`removes backspaces (chr$(8)) from in
local out as string : local i as integer
for i = 1 to len(in)
if asc(mid$(in, i)) <> 8 then out = out + mid$(in, i)
next i
endfunction out
function showobj
`position object 1,0,0,0
rotate object 1,wrapvalue(360)+i,wrapvalue(360)+i,wrapvalue(360)+i
inc i
if i>360 then i =1
endfunction
I'm not getting you down am I, Ho Look! another fancy Door?