Wow, you sure do have some confusing timer stuff in there...
Sadly, I don't think you quite understood me...I know how to do the input thing using the entry buffer, I have it all set up, it even writes the text to a texture for an object.
My problem is that when the text is
centered I can't have a blinking cursor because then it offsets the text different than a space, as in the snippet below (your code, except I centered the text instead):
sync on : sync rate 0
set display mode 640,480,32
set window on
set window title "Text Application"
dim Time#(2,5) :` old=1, duration=2, current=3, accumulator=4, clear accumulator=5
dim cursor$(0) : Cursor$(0) = ""
dim output$(0)
for index = 1 to 2
UpdateTime(index)
next index
repeat
` update timers
for index = 1 to 2
UpdateTime(index)
next index
` adjust to comfort
if Time#(2,4) >= 25 then UpdateText() : Time#(2,5)=1
if Time#(1,4) >= 80
if cursor$(0) = "" then cursor$(0)="|" else cursor$(0)=""
Time#(1,5) = 1
endif
` show text
backdrop on : color backdrop rgb(0,0,0)
text 10,240,"Enter Your Name:"
center text 250, 240, output$(0)+cursor$(0)
` render
sync
until lower$(output$(0))="exit"
function UpdateText()
current$ = entry$()
for index = 1 to len(current$)
if asc(mid$(current$,index)) = 8
output$(0) = left$( output$(0), len(output$(0))-1 )
else
output$(0)=output$(0) + mid$(current$,index)
endif
next index
clear entry buffer
endfunction
function UpdateTime( index )
Time#(index,3) = timer()
Time#(index,2) = Time#(index,3) - Time#(index,1)
Time#(index,1) = Time#(index,3)
if Time#(index,5) = 1
Time#(index,4) = 0
else
Time#(index,4) = Time#(index,4) + Time#(index,2)
endif
Time#(index,5) = 0
endfunction
See what I mean?
Oh well, if what I want is not possible I will just skip the blinking cursor, not a problem.
Thanks anyway
Xander Moser - Bolt Software - Firewall
