Input function, replaces DBPro's input command by Orgull V24th Sep 2004 20:18
|
---|
Summary Variable font sizes, clear background (no underlines), functional backspace. Description Hi there. Code ` This code was downloaded from The Game Creators ` It is reproduced here with full permission ` http://www.thegamecreators.com function inputtext(x,y,inputcolor,bkgcolor) text$ = "" do current$ = inkey$() if current$ = old$ then goto skip1 if scancode() <> 14 if scancode() <> 28 text$ = text$ + current$ old$ = current$ endif endif skip1: if scancode() = 14 then text$ = left$(text$,len(text$)-1):slow = 1 if scancode() = 28 then goto out ink bkgcolor,0 x1 = (x-(text width(text$)/2))-(text size()+1) x2 = (x+(text width(text$)/2))+(text size()+1) y1 = y-3 y2 = (y+text size()+3) box x1,y1,x2,y2 ink inputcolor,0 set text opaque center text x,y,text$ if slow = 1 then wait 150:slow = 0 loop out: endfunction text$ |