Thread: middle mouse movement

Page 3 of 9 FirstFirst 12345 ... LastLast
Results 21 to 30 of 86
  1. #21  
    Banned

    Join Date
    Apr 2013
    Posts
    1,456
    Thanks given
    341
    Thanks received
    148
    Rep Power
    0
    Quote Originally Posted by Geni View Post
    Erm, I mean for panning the camera up and down, this is only left & right.
    you can do this already
    Reply With Quote  
     

  2. #22  
    Banned
    Join Date
    May 2014
    Age
    29
    Posts
    78
    Thanks given
    0
    Thanks received
    6
    Rep Power
    0
    Quote Originally Posted by TheIronDoorProject View Post
    you can do this already
    Erm, no? Not by the code supplied in this snippet.
    Reply With Quote  
     

  3. #23  
    Banned

    Join Date
    Apr 2013
    Posts
    1,456
    Thanks given
    341
    Thanks received
    148
    Rep Power
    0
    Quote Originally Posted by Geni View Post
    Erm, no? Not by the code supplied in this snippet.

    i can and i could not before
    Reply With Quote  
     

  4. #24  
    Registered Member
    Invision's Avatar
    Join Date
    Nov 2013
    Posts
    287
    Thanks given
    54
    Thanks received
    303
    Rep Power
    655
    10/10 gj using
    Reply With Quote  
     

  5. #25  
    Registered Member Snijder's Avatar
    Join Date
    May 2014
    Posts
    167
    Thanks given
    18
    Thanks received
    58
    Rep Power
    27
    Quote Originally Posted by Invision View Post
    10/10 gj using
    thank you for feedback
    Reply With Quote  
     

  6. #26  
    Registered Member alexsandro's Avatar
    Join Date
    Apr 2013
    Age
    28
    Posts
    346
    Thanks given
    109
    Thanks received
    27
    Rep Power
    0
    Good job on this.
    "Death is not the greatest loss in life.
    The greatest loss is what dies inside while still alive.
    Never surrender." - Tupac Shakur
    Reply With Quote  
     

  7. #27  
    Registered Member Snijder's Avatar
    Join Date
    May 2014
    Posts
    167
    Thanks given
    18
    Thanks received
    58
    Rep Power
    27
    Quote Originally Posted by alexsandro View Post
    Good job on this.
    thank you sir
    Reply With Quote  
     

  8. #28  
    Registered Member
    Join Date
    Nov 2009
    Posts
    3,052
    Thanks given
    112
    Thanks received
    838
    Rep Power
    740
    code looks pretty familiar , even the 100% exact naming, method places and calculation.
    Even the exact same comments lolz and placing of variables too xD

    But i guess the naming cud only be that.
    Reply With Quote  
     

  9. #29  
    Alreet marras?
    Picka's Avatar
    Join Date
    Oct 2012
    Posts
    201
    Thanks given
    66
    Thanks received
    13
    Rep Power
    14
    Quote Originally Posted by Snijder View Post
    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
    Worked on my other client, however when i try on my other client, this happens;

    Whenever i try to rotate the camera, it forces the angle to an arial view: Gyazo - 25973099f19b6c2cfd1bad073794f39d.gif

    Any suggestions?
    Reply With Quote  
     

  10. #30  
    Registered Member Snijder's Avatar
    Join Date
    May 2014
    Posts
    167
    Thanks given
    18
    Thanks received
    58
    Rep Power
    27
    Quote Originally Posted by owner blade View Post
    code looks pretty familiar , even the 100% exact naming, method places and calculation.
    Even the exact same comments lolz and placing of variables too xD

    But i guess the naming cud only be that.
    Bought it from you since allantios is out i thought i could release it , i am Theowned
    Reply With Quote  
     

Page 3 of 9 FirstFirst 12345 ... 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 Application Development
    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
  •