Thread: Cant type at login box!?!?

Results 1 to 4 of 4
  1. #1 Cant type at login box!?!? 
    Registered Member Richie's Avatar
    Join Date
    Sep 2009
    Age
    25
    Posts
    791
    Thanks given
    81
    Thanks received
    18
    Rep Power
    6
    Idk why but for some reason my login box doesnt let me type...anyone know what method handles typing or can tell me what to do please? Thanks
    Reply With Quote  
     

  2. #2  
    Registered Member Steward's Avatar
    Join Date
    Jan 2011
    Posts
    32
    Thanks given
    0
    Thanks received
    7
    Rep Power
    1
    Please post your:
    Code:
    private void drawLoginScreen(boolean flag)
    {
    ....Your code
    }
    So yeah just post your drawLoginScreen and I will take a look at it.
    It is in client.java
    removed
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jan 2009
    Posts
    295
    Thanks given
    3
    Thanks received
    2
    Rep Power
    40
    The method that deals with keystrokes is processLoginScreenInput()

    This is the important part of the method, past all the clicking shit.
    Code:
    			int l1 = readChar(-796); //read keystrokes
    			if (l1 == -1) { //no new keystrokes
    				break;
    			}
    			boolean validChar = false; //is the character valid?
    			for (int i2 = 0; i2 < validUserPassChars.length(); i2++) { //check and see
    				if (l1 != validUserPassChars.charAt(i2)) {
    					continue; //it's not valid, break the loop
    				}
    				validChar = true; //it's valid, proceed
    				break;
    			}
    and
    Code:
    				if (loginScreenCursorPos == 0) {
    					if ((l1 == 8) && (myUsername.length() > 0)) { //backspace
    						myUsername = myUsername.substring(0, myUsername.length() - 1);
    					}
    					if ((l1 == 9) || (l1 == 10) || (l1 == 13)) { //enter or return
    						loginScreenCursorPos = 1;
    					}
    					if (validChar) {
    						myUsername += (char) l1; //add the keystroke
    					}
    					if (myUsername.length() > 12) {
    						myUsername = capitalize(myUsername.substring(0, 11)); //make sure it's not too long
    					}
    				}
    Some of that is unique to my client, but the concept is the same.

    The drawing part is handled in drawLoginScreen()
    Code:
    			chatTextDrawingArea.method389(true, c / 2 - 90, 0xffffff, "Username: " + myUsername + ((loginScreenCursorPos == 0) & (loopCycle % 40 < 20) ? "@[email protected]|" : ""), j);
    			j += 15;
    			chatTextDrawingArea.method389(true, c / 2 - 88, 0xffffff, "Password: " + TextClass.passwordAsterisks(myPassword) + ((loginScreenCursorPos == 1) & (loopCycle % 40 < 20) ? "@[email protected]|" : ""), j);
    			j += 15;
    Or something similar to that.

    You're gonna wanna watch the variable loginScreenState, but basically make sure you're processing the login stage that you're drawing.
    Reply With Quote  
     

  4. #4  
    Registered Member Richie's Avatar
    Join Date
    Sep 2009
    Age
    25
    Posts
    791
    Thanks given
    81
    Thanks received
    18
    Rep Power
    6
    No that wasnt my problem, but i got it fixed. Thanks for givin me some info though
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 11
    Last Post: 07-19-2010, 12:31 PM
  2. Replies: 1
    Last Post: 04-05-2010, 10:58 PM
  3. Different Type Of Login Format
    By PokeyDots in forum Help
    Replies: 6
    Last Post: 03-11-2009, 12:05 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •