Thread: middle mouse movement

Page 1 of 9 123 ... LastLast
Results 1 to 10 of 85
  1. #1 middle mouse movement 
    Registered Member Snijder's Avatar
    Join Date
    May 2014
    Posts
    169
    Thanks given
    18
    Thanks received
    57
    Rep Power
    27
    Just joined this community so i decided to release my middle mouse movement

    files used : Client.java, RSApplet.java

    step 1 :

    open up Client.java and add this method

    Code:
    	void mouseWheelDragged(int i, int j) {
    		if (!mouseWheelDown)
    			return;
    		this.anInt1186 += i * 3;
    		this.anInt1187 += (j << 1);
    	}

    you are done with client.java so you can close it

    step 2 : open up RSApplet.java
    search for

    Code:
    public final void mousePressed(MouseEvent e) {
    above that add :
    Code:
    public boolean mouseWheelDown;
    in the method mousePressed after :
    Code:
    clickTime = System.currentTimeMillis();
    add this
    Code:
    if (type == 2) {
    			mouseWheelDown = true;
    			mouseWheelX = x;
    			mouseWheelY = y;
    			return;
    		}
    for people who doenst have 'type'
    Code:
    int type = e.getButton();

    step 3 : still in RSApplet.java replace mousedragged method with this one:
    Code:
    	public int mouseWheelX;
    	public int mouseWheelY;
    	public final void mouseDragged(MouseEvent e) {
    		int x = e.getX();
    		int y = e.getY();
    		if(gameFrame != null) {
    			Insets insets = gameFrame.getInsets();
    			x -= insets.left;//4
    			y -= insets.top;//22
    		}
    		if (mouseWheelDown) {
    			y = mouseWheelX - e.getX();
    			int k = mouseWheelY - e.getY();
    			mouseWheelDragged(y, -k);
    			mouseWheelX = e.getX();
    			mouseWheelY = e.getY();
    			return;
    		}
    		idleTime = 0;
    		mouseX = x;
    		mouseY = y;
    		clickType = DRAG;
    	}
    underneath that add

    Code:
    void mouseWheelDragged(int param1, int param2) {
    
    	}
    step 4 : the final step in the method :
    Code:
    public final void mouseReleased(MouseEvent e) {
    under
    Code:
    clickType = RELEASED;
    add
    Code:
    mouseWheelDown = false;
    hope this worked out.
    any questions? leave a comment bellow
    Reply With Quote  
     


  2. #2  
    Registered Member
    Zivik's Avatar
    Join Date
    Oct 2007
    Age
    24
    Posts
    4,445
    Thanks given
    892
    Thanks received
    1,525
    Rep Power
    3206
    Thanks for the contribution.
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  3. #3  
    Shrek is luv. Shrek is lyfe.

    Leon.'s Avatar
    Join Date
    Oct 2013
    Posts
    1,881
    Thanks given
    147
    Thanks received
    618
    Rep Power
    4020
    Very good job on this, should help people.


    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  4. #4  
    Registered Member Snijder's Avatar
    Join Date
    May 2014
    Posts
    169
    Thanks given
    18
    Thanks received
    57
    Rep Power
    27
    Quote Originally Posted by Zivik View Post
    Thanks for the contribution.
    Quote Originally Posted by Leon X D View Post
    Very good job on this, should help people.
    thanks for the feedback , my first release
    Reply With Quote  
     

  5. #5  
    Rune-Server Affiliate

    Join Date
    Apr 2014
    Posts
    1,733
    Thanks given
    57
    Thanks received
    672
    Discord
    Zion#7576
    Rep Power
    988
    I swear this is in allantois
    Reply With Quote  
     

  6. #6  
    hi


    Join Date
    Aug 2013
    Posts
    934
    Thanks given
    291
    Thanks received
    383
    Rep Power
    402
    Quote Originally Posted by Zion View Post
    I swear this is in allantois
    He just took it out of another client and released.
    Reply With Quote  
     

  7. #7  
    Registered Member Snijder's Avatar
    Join Date
    May 2014
    Posts
    169
    Thanks given
    18
    Thanks received
    57
    Rep Power
    27
    Quote Originally Posted by Valiant View Post
    He just took it out of another client and released.
    I had this before allantios release
    Reply With Quote  
     

  8. #8  
    hi


    Join Date
    Aug 2013
    Posts
    934
    Thanks given
    291
    Thanks received
    383
    Rep Power
    402
    Quote Originally Posted by KinderFeest View Post
    I had this before allantios release
    Never said anything about allantios did i , It's in some other clients such as Project-Exile etc and the code looks the exact same.
    Reply With Quote  
     

  9. #9  
    Banned
    Join Date
    Mar 2014
    Posts
    632
    Thanks given
    109
    Thanks received
    181
    Rep Power
    0
    What exactly is this used for? Like moving the camera with the scroll wheel?
    Reply With Quote  
     

  10. #10  
    Rune-Server Affiliate

    Join Date
    Apr 2014
    Posts
    1,733
    Thanks given
    57
    Thanks received
    672
    Discord
    Zion#7576
    Rep Power
    988
    Yes.
    Reply With Quote  
     

Page 1 of 9 123 ... LastLast

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. Middle mouse button to move camera
    By FaintView in forum Requests
    Replies: 8
    Last Post: 05-22-2014, 12:14 AM
  2. Mouse scrolling
    By Danno in forum Tutorials
    Replies: 32
    Last Post: 05-19-2009, 07:18 AM
  3. Logical Movement
    By Meanz in forum Application Development
    Replies: 2
    Last Post: 12-08-2008, 05:34 PM
  4. Making the mouse jump around.
    By xiphias_ in forum Tutorials
    Replies: 3
    Last Post: 09-25-2008, 01:39 AM
  5. mouse trap mini not mine
    By Aggi in forum Tutorials
    Replies: 9
    Last Post: 04-09-2008, 02:38 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
  •