Advertisement
Guest User

Untitled

a guest
Apr 8th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.08 KB | None | 0 0
  1. private void processLoginScreenInput() {
  2. try {
  3. if(super.clickMode3 == 1) {
  4.  
  5. if(homeHover) {
  6. launchURL("http://RelixScape.com/");
  7. loginMessages = new String[]{"We've attempted to open www.RelixScape.com", "for you."};
  8. } else if(forumHover) {
  9. launchURL("http://RelixScape.com/Forums/");
  10. loginMessages = new String[]{"We've attempted to open", "www.RelixScape.com/Forums/ for you."};
  11. } else if(voteHover) {
  12. launchURL("http://vote.relixscape.com");
  13. loginMessages = new String[]{"We've attempted to open", "www.vote.relixscape.com for you."};
  14. } else if(storeHover) {
  15. launchURL("http://store.relixscape.com");
  16. loginMessages = new String[]{"We've attempted to open", "www.store.relixscape.com for you."};
  17. } else if(hiscoresHover) {
  18. launchURL("http://hiscores.relixscape.com");
  19. loginMessages = new String[]{"We've attempted to open", "www.hiscores.relixscape.com for you."};
  20.  
  21. if(loginMessages[0].length() > 0) {
  22. if(backButtonHover) {
  23. loginMessages = new String[]{""};
  24. backButtonHover = false;
  25. }
  26. return;
  27. }
  28.  
  29. if(input1Hover) {
  30. loginScreenCursorPos = 0;
  31. } else if(input2Hover) {
  32. loginScreenCursorPos = 1;
  33. } else if(loginButtonHover) {
  34. login(myUsername, myPassword, false);
  35. } else if(rememberMeButtonHover) {
  36. rememberMe = !rememberMe;
  37. saveSettings();
  38. }
  39. if(loggedIn)
  40. return;
  41. }
  42. if(isLoading)
  43. return;
  44. do {
  45. int key = readChar(-796);
  46. if(key == -1) {
  47. break;
  48. }
  49. if(loginMessages[0].length() > 0) {
  50. loginMessages = new String[]{""};
  51. backButtonHover = false;
  52. return;
  53. }
  54. boolean validKey = false;
  55. for(int index = 0; index < VALID_CC_NAME_KEYS.length(); index++) {
  56. if(key != VALID_CC_NAME_KEYS.charAt(index)) {
  57. continue;
  58. }
  59. validKey = true;
  60. break;
  61. }
  62. if(loginScreenCursorPos == 0) {
  63. if(key == 8 && myUsername.length() > 0) {
  64. myUsername = myUsername.substring(0, myUsername.length() - 1);
  65. }
  66. if(key == 9 || key == 10 || key == 13) {
  67. loginScreenCursorPos = 1;
  68. }
  69. if(validKey) {
  70. myUsername = myUsername + (char)key;
  71. myUsername = optimizeText(myUsername.toLowerCase());
  72. }
  73. if(myUsername.length() > 12) {
  74. myUsername = myUsername.substring(0, 12);
  75. }
  76. } else if(loginScreenCursorPos == 1) {
  77. if(key == 8 && myPassword.length() > 0) {
  78. myPassword = myPassword.substring(0, myPassword.length() - 1);
  79. drawLoginScreen();
  80. }
  81. if (key == 9) {
  82. loginScreenCursorPos = 0;
  83. }
  84. if(key == 10 || key == 13) {
  85. loginFailures = 0;
  86. login(myUsername, myPassword, false);
  87. if(loggedIn)
  88. return;
  89. }
  90. if(validKey) {
  91. myPassword += (char)key;
  92. }
  93. if(myPassword.length() > 20) {
  94. myPassword = myPassword.substring(0, 20);
  95. }
  96. }
  97. } while(true);
  98. return;
  99. } catch(Exception e) {
  100. e.printStackTrace();
  101. }
  102. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement