titlescreen.lua 979 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. local state = require "/lib/stateswitcher"
  2. local suit = require "/lib/suit-master"
  3. local in_User = {text = ""}
  4. local in_Domain = {text = ""}
  5. local in_Port = {text = ""}
  6. local button1 = "Press me UwU";
  7. function love.load()
  8. print("loaded");
  9. end
  10. function love.update(dt)
  11. suit.Label("Username", {align="center"}, 100,65,100,30)
  12. suit.Input(in_User,100,100,100,30);
  13. suit.Label("Domain", {align="center"}, 100,165,100,30)
  14. suit.Input(in_Domain,100,200,100,30);
  15. suit.Label("Port", {align="center"}, 100,265,100,30)
  16. suit.Input(in_Port,100,300,100,30);
  17. if suit.Button(button1,400,300, 100,30).hit then
  18. button1 = "I <3 relat";
  19. state.switch("main");
  20. end
  21. end
  22. function love.textinput(t)
  23. suit.textinput(t);
  24. end
  25. function love.keypressed(key)
  26. suit.keypressed(key);
  27. end
  28. function love.draw()
  29. suit.draw();
  30. end
  31. function love.update(dt)
  32. lovelyMoon.event.update(dt)
  33. end
  34. function love.draw()
  35. lovelyMoon.event.draw()