Changes

Jump to navigation Jump to search

on.charIn

287 bytes removed, 12:53, 22 December 2011
no edit summary
Line 11: Line 11:     
  function on.charIn(char)
 
  function on.charIn(char)
     if string.len(input) >= 25 then  -- Here, we set a 25 chars limit
+
     input = input..char  -- appending
        input = input..char  -- appending
+
    platform.window:invalidate()  -- refreshing the screen
        platform.window:invalidate()  -- refreshing the screen
  −
    end
   
  end
 
  end
   −
function on.backspaceKey()
  −
    input = string.usub(input,0,string.len(input)-1)  -- deleting the last char (with unicode support)
  −
    platform.window:invalidate()  -- refreshing the screen
  −
end
   
</syntaxhighlight>
 
</syntaxhighlight>
  

Navigation menu