Thread: Press enter to chat

Results 1 to 8 of 8
  1. #1 Press enter to chat 
    Registered Member
    Join Date
    Aug 2013
    Posts
    15
    Thanks given
    0
    Thanks received
    1
    Rep Power
    14
    Just made this like 5mins ago,



    in client.java add

    Code:
    static boolean EntertoChat = true;
    in drawChatBox() (Remove or edit resizable stuff if need be)
    Code:
     if(EntertoChat){
    	            newRegularFont.drawBasicString(frameMode == ScreenMode.RESIZABLE && transChat? "<shad=3><col=ffffff>" + s + ":</col></shad>" + "<col=4f4c4c><shad=3> [Press Enter to Chat]</shad></col>" : s + ":" + "<col=6b6868> [Press Enter to Chat]</col>",11+xOffset,133 + yOffset,0,-1);	            
    		      	newRegularFont.drawBasicString(inputString , 12 + textDrawingArea.getTextWidth(s + ": "),133+ yOffset,frameMode == ScreenMode.RESIZABLE && transChat? 0x7FA9FF : 255,-1);
    	            } else {
    	            newRegularFont.drawBasicString(s + ":" , 11+xOffset, 133 + yOffset,frameMode == ScreenMode.RESIZABLE && transChat? 0xffffff : 0,-1);
    	     	    newRegularFont.drawBasicString(inputString+ ((loopCycle % 40 < 20) ? "<col=114AA0>|</col>" : ""), 12 +xOffset+ textDrawingArea.getTextWidth(s + ": "),133+ yOffset,frameMode == ScreenMode.RESIZABLE && transChat? 0x7FA9FF : 255,-1);                             
    	            }
    In method73() find
    Code:
    j >= 32 && j <= 122 && inputString.length() < 80
    and replace/edit with
    Code:
    if(j >= 32 && j <= 122 && inputString.length() < 80 && EntertoChat != true)
    				{
    					inputString += (char)j;
    					inputTaken = true;
    					
    				}
    				if(j == 8 && inputString.length() > 0 && EntertoChat != true)
    				{
    					inputString = inputString.substring(0, inputString.length() - 1);
    					inputTaken = true;
    				}
    at the bottom of method73() just before/after
    Code:
    inputTaken = true;
    add
    Code:
    EntertoChat = true;

    Now go into rsapplet and find void keyPressed( and add in there
    Code:
    if(i == KeyEvent.VK_ENTER && client.loggedIn && client.openInterfaceID == -1){
    			if(client.hideChat)
    				return;
    			client.EntertoChat = !client.EntertoChat;
    		}
    Reply With Quote  
     

  2. Thankful user:


  3. #2  
    Rune-Server Affiliate

    Join Date
    Apr 2014
    Posts
    1,761
    Thanks given
    75
    Thanks received
    714
    Rep Power
    1073
    kinda cool, but no real point unless you have WASD movement or something.

    good job nonetheless
    Reply With Quote  
     

  4. #3  


    RS Wiki's Avatar
    Join Date
    Mar 2011
    Age
    29
    Posts
    9,688
    Thanks given
    1,752
    Thanks received
    3,103
    Rep Power
    5000
    Quote Originally Posted by King Briann View Post
    Good job , probably come to good use for me since my cat likes to walk on my keyboard and types a bunch of non-sense.
    Every cat now has to change their tactics apparently now.
    All the best,
    Wiki




    coming soon
    Reply With Quote  
     

  5. #4  
    Registered Member
    Join Date
    Aug 2013
    Posts
    15
    Thanks given
    0
    Thanks received
    1
    Rep Power
    14
    Quote Originally Posted by Zion View Post
    kinda cool, but no real point unless you have WASD movement or something.

    good job nonetheless
    26 more keys to bind

    For example: H to home teleport or S to open the settings interface, F to switch fog off etc etc.

    My original idea was to use WASD for camera movement as an alternative to the arrow keys
    Reply With Quote  
     

  6. #5  
    Registered Member
    1210saad's Avatar
    Join Date
    Aug 2013
    Posts
    315
    Thanks given
    39
    Thanks received
    22
    Rep Power
    132
    Thanks.
    Attached image
    Reply With Quote  
     

  7. #6  
    Registered Member
    Join Date
    Jun 2016
    Posts
    52
    Thanks given
    5
    Thanks received
    0
    Rep Power
    11
    this is in Battle-OS.
    Reply With Quote  
     

  8. #7  
    Registered Member
    Join Date
    Aug 2013
    Posts
    15
    Thanks given
    0
    Thanks received
    1
    Rep Power
    14
    Quote Originally Posted by ItsR34 View Post
    this is in Battle-OS.
    Good for battle-os
    Reply With Quote  
     

  9. #8  
    sυввч

    Sub's Avatar
    Join Date
    Aug 2007
    Age
    24
    Posts
    4,352
    Thanks given
    1,205
    Thanks received
    359
    Rep Power
    2845
    Simple but good job.
    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. [Both] Press enter to log on, done properly
    By Shoes in forum Snippets
    Replies: 19
    Last Post: 06-22-2013, 05:52 PM
  2. Pressing Enter to Log-in
    By Proffessor Oak in forum Help
    Replies: 0
    Last Post: 12-21-2009, 11:16 AM
  3. Press enter to login
    By owner jordan in forum Requests
    Replies: 0
    Last Post: 10-26-2009, 06:15 AM
  4. Replies: 2
    Last Post: 06-23-2009, 10:52 AM
  5. Pressing enter to login when on password Entry
    By ViperSniper in forum Tutorials
    Replies: 18
    Last Post: 06-21-2009, 05:32 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •