Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void processLoginScreenInput() {
- try {
- if(super.clickMode3 == 1) {
- if(homeHover) {
- launchURL("http://RelixScape.com/");
- loginMessages = new String[]{"We've attempted to open www.RelixScape.com", "for you."};
- } else if(forumHover) {
- launchURL("http://RelixScape.com/Forums/");
- loginMessages = new String[]{"We've attempted to open", "www.RelixScape.com/Forums/ for you."};
- } else if(voteHover) {
- launchURL("http://vote.relixscape.com");
- loginMessages = new String[]{"We've attempted to open", "www.vote.relixscape.com for you."};
- } else if(storeHover) {
- launchURL("http://store.relixscape.com");
- loginMessages = new String[]{"We've attempted to open", "www.store.relixscape.com for you."};
- } else if(hiscoresHover) {
- launchURL("http://hiscores.relixscape.com");
- loginMessages = new String[]{"We've attempted to open", "www.hiscores.relixscape.com for you."};
- if(loginMessages[0].length() > 0) {
- if(backButtonHover) {
- loginMessages = new String[]{""};
- backButtonHover = false;
- }
- return;
- }
- if(input1Hover) {
- loginScreenCursorPos = 0;
- } else if(input2Hover) {
- loginScreenCursorPos = 1;
- } else if(loginButtonHover) {
- login(myUsername, myPassword, false);
- } else if(rememberMeButtonHover) {
- rememberMe = !rememberMe;
- saveSettings();
- }
- if(loggedIn)
- return;
- }
- if(isLoading)
- return;
- do {
- int key = readChar(-796);
- if(key == -1) {
- break;
- }
- if(loginMessages[0].length() > 0) {
- loginMessages = new String[]{""};
- backButtonHover = false;
- return;
- }
- boolean validKey = false;
- for(int index = 0; index < VALID_CC_NAME_KEYS.length(); index++) {
- if(key != VALID_CC_NAME_KEYS.charAt(index)) {
- continue;
- }
- validKey = true;
- break;
- }
- if(loginScreenCursorPos == 0) {
- if(key == 8 && myUsername.length() > 0) {
- myUsername = myUsername.substring(0, myUsername.length() - 1);
- }
- if(key == 9 || key == 10 || key == 13) {
- loginScreenCursorPos = 1;
- }
- if(validKey) {
- myUsername = myUsername + (char)key;
- myUsername = optimizeText(myUsername.toLowerCase());
- }
- if(myUsername.length() > 12) {
- myUsername = myUsername.substring(0, 12);
- }
- } else if(loginScreenCursorPos == 1) {
- if(key == 8 && myPassword.length() > 0) {
- myPassword = myPassword.substring(0, myPassword.length() - 1);
- drawLoginScreen();
- }
- if (key == 9) {
- loginScreenCursorPos = 0;
- }
- if(key == 10 || key == 13) {
- loginFailures = 0;
- login(myUsername, myPassword, false);
- if(loggedIn)
- return;
- }
- if(validKey) {
- myPassword += (char)key;
- }
- if(myPassword.length() > 20) {
- myPassword = myPassword.substring(0, 20);
- }
- }
- } while(true);
- return;
- } catch(Exception e) {
- e.printStackTrace();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement