Advertisement
lavalevel

Non Zonkey field handler

Aug 8th, 2013
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.83 KB | None | 0 0
  1.         local function fieldHandler( event )
  2.  
  3.             if ( "began" == event.phase ) then
  4.                 -- This is the "keyboard has appeared" event
  5.                 -- In some cases you may want to adjust the interface when the keyboard appears.
  6.            
  7.             elseif ( "ended" == event.phase ) then
  8.                 -- This event is called when the user stops editing a field: for example, when they touch a different field
  9.            
  10.             elseif ( "submitted" == event.phase ) then
  11.                 -- This event occurs when the user presses the "return" key (if available) on the onscreen keyboard
  12.             -- Hide keyboard
  13.  
  14.  
  15.                 if ("iOS" ~= system.getInfo("platformName")) then
  16.                 newBtnYes:removeEventListener( "touch", onbtnYes )
  17.                 newBtnYes:removeSelf()
  18.                 newBtnYes = nil
  19.  
  20.                 end
  21.  
  22.             playerName = defaultField.text
  23.             fields:removeSelf()
  24.             verifyName()       
  25.  
  26.             end
  27.         end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement