Guest User

Untitled

a guest
Oct 24th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. MenuState = {
  2. ["ip"] = "127.0.0.1",
  3.  
  4. ["update"] = function(self, dt)
  5.  
  6. end,
  7.  
  8. ["draw"] = function(self, dt)
  9. love.graphics.setFont(18)
  10. love.graphics.print('Enter IP:\n' .. self.ip, 200, 200)
  11. end,
  12.  
  13. ["keypressed"] = function(self, key)
  14. if key == "backspace" then
  15. self.ip = string.sub(self.ip, 1, -2)
  16. return
  17. elseif key == "return" then
  18. return
  19. end
  20. self.ip = self.ip .. key
  21. end,
  22. }
Add Comment
Please, Sign In to add comment