Thread: Help if possible!

Results 1 to 2 of 2
  1. #1 Help if possible! 
    Registered Member
    Join Date
    Apr 2024
    Posts
    5
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    Hello, New guy here asking for free shit as usual!

    Nah seriously, I am currently learning on a project based off CLEAN PI, by cleaned. the guy really means 1000% cleaned, I even had to re write the basic functions to right click around the world.
    Now my next task I have taken on is figuring out how to make mousewheeldown drag, I have been implementing code I haven't been successful yet.

    Link to the guide I am following middle mouse movement

    I am able to add this but for some reason with no errors, but when executing the method NOTHING HAPPENS.

    I tried downloading version 8 of JDK thinking maybe, this was my issue as I read in other post, the older version of Java had a problem with the right click (my original hopes to fix my right click problem)
    Found out that it wasn't my issue & I actually needed to create new statements inside the bracers for it to work.

    But still my mouse camera movement doesn't work.....

    PS i have full functionality of camera with, keyboard controls :/

    Does anyone have any idea why I might not be receiving any errors and still the code does not work?





    EDIT FOR CONTEXT:

    Inside of my client.java file I have
    //added this here
    void mouseWheelDragged(int i, int j) {
    if (!mouseWheelDown)
    return;
    this.anInt1186 += i * 3;
    this.anInt1187 += (j << 1);
    }



    All the mouse movement parts from my RSApplet.java including left and right click
    public boolean mouseWheelDown;
    public final void mousePressed(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
    }
    idleTime = 0;
    clickX = x;
    clickY = y;
    int type = e.getButton();
    clickTime = System.currentTimeMillis();
    if (type == 2) {
    boolean mouseWheelDown = true;
    int mouseWheelX = x;
    int mouseWheelY = y;
    return;
    }

    Object clickType;
    if (type == 1) {
    Object LEFT = null;
    clickType = LEFT;
    clickMode1 = 1;
    clickMode2 = 1;
    }

    if (type == 3) {
    String RIGHT = null;
    clickType = RIGHT;
    clickMode1 = 2;
    clickMode2 = 2;
    }

    }

    public final void mouseReleased(MouseEvent mouseevent)
    {
    idleTime = 0;
    clickMode2 = 0;
    mouseWheelDown = false;
    }

    public final void mouseClicked(MouseEvent mouseevent)
    {
    }

    public final void mouseEntered(MouseEvent mouseevent)
    {
    }

    public final void mouseExited(MouseEvent mouseevent)
    {
    idleTime = 0;
    mouseX = -1;
    mouseY = -1;
    }

    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;
    Object DRAG = null;
    Object clickType = DRAG;
    }

    void mouseWheelDragged(int param1, int param2) {

    }
    Last edited by Bong lord; 04-06-2024 at 03:39 AM. Reason: Added my code
    Reply With Quote  
     

  2. #2  
    Donator
    Zenpex's Avatar
    Join Date
    Mar 2021
    Posts
    54
    Thanks given
    9
    Thanks received
    2
    Rep Power
    38
    Add me on discord officialzenpex
    Attached image
    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: 0
    Last Post: 07-21-2016, 12:04 PM
  2. Replies: 2
    Last Post: 02-01-2010, 09:17 AM
  3. hyperion help needed graham if possible
    By Raiden1 in forum Help
    Replies: 3
    Last Post: 11-30-2009, 10:17 PM
  4. compiling error plz help if possible
    By zammy ftw in forum Help
    Replies: 7
    Last Post: 10-10-2009, 03:32 AM
  5. Help with a timer, if possible.
    By dark lotus in forum Help
    Replies: 6
    Last Post: 02-28-2009, 04:18 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
  •