Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MenuState = {
- ["ip"] = "127.0.0.1",
- ["update"] = function(self, dt)
- end,
- ["draw"] = function(self, dt)
- love.graphics.setFont(18)
- love.graphics.print('Enter IP:\n' .. self.ip, 200, 200)
- end,
- ["keypressed"] = function(self, key)
- if key == "backspace" then
- self.ip = string.sub(self.ip, 1, -2)
- return
- elseif key == "return" then
- return
- end
- self.ip = self.ip .. key
- end,
- }
Add Comment
Please, Sign In to add comment