Not exactly - it chops off code... Either that or it doesn't like tabs...
This is what it should be :
function enterNameText(xPosName# as float,yPosName as DWORD)
local t as DWORD
local sKey as DWORD
local movement as float
local oneChar as DWORD
local text$ as string
text$=""
movement=0.0
t=getTime()
do
texturePlain(movement)
sKey=scancode()
if sKey<>0
oneChar=call dll (DLL_FUNCMAPPER,"?getScanCodeToASCII@CFuncMap@@QAEKKK@Z",_
sKey,_
GET_ASCIICODE || GET_BACKSPACECODE || _
GET_RETURNCODE || GET_ESCAPE)
select oneChar
case KEY_ESCAPE : Rem Escape
exitfunction ""
endcase
case KEY_DELETE : Rem delete
if len(text$)>0
text$=left$(text$,len(text$)-1)
endif
endcase
case KEY_RETURN : Rem Enter
if len(text$)>0
exitfunction text$
endif
endcase
case default : Rem A letter
if len(text$)<MAX_CHARSINNAME
text$=text$+chr$(oneChar)
endif
endcase
endselect
Rem Make sure that the repeat isn't too quick
t=getTime()
movement=0.0
repeatTime=0.0
while scancode()=sKey and repeatTime<MAX_REPEATSPEED
texturePlain(movement)
inc repeatTime,movement
movement=returnMovement(t,750)
t=getTime()
sync
endwhile
endif
displayNameSprites(text$,xPosName#,yPosName,TRUE)
movement=returnMovement(t,500)
t=getTime()
sync
loop
endfunction ""
But the code button only display 1/2 of it...