Re: Newbie Question

new topic     » goto parent     » topic index » view thread      » older message » newer message
Trixar_za said...

I want to read from the input without stopping the process - how can I do this?

You'll need to put a get_key() inside your polling loop (get_key() doesn't wait for input). For example (pseudo-code):

while 1 do 
  x = get_key() 
  if x = RETURN_KEY then 
    process(word) 
  elsif x = DELETE_KEY 
    word = word[1..$-1] 
  elsif x = ESC_KEY then 
    exit -- exits the primary polling/processing loop 
  else 
    word &= x 
  end if 
  process_mud_stuff() 
end while 
new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu