Package org.rsbot.client.input

Examples of org.rsbot.client.input.Mouse


  public TMousePosition(final Bot bot) {
    client = bot.getClient();
  }

  public int drawLine(final Graphics render, int idx) {
    final Mouse mouse = client.getMouse();
    if (mouse != null) {
      final int mouse_x = mouse.getX();
      final int mouse_y = mouse.getY();
      final String off = mouse.isPresent() ? "" : " (off)";
      StringUtil.drawLine(render, idx++, "Mouse Position: (" + mouse_x + "," + mouse_y + ")" + off);
    }
    return idx;
  }
View Full Code Here


  public DrawMouse(Bot bot) {
    client = bot.getClient();
  }

  public void onRepaint(final Graphics render) {
    Mouse mouse = client.getMouse();
    if (mouse != null) {
      int mouse_x = mouse.getX();
      int mouse_y = mouse.getY();
      int mouse_press_x = mouse.getPressX();
      int mouse_press_y = mouse.getPressY();
      long mouse_press_time = mouse.getPressTime();
      render.setColor(Color.GREEN);
      render.drawLine(mouse_x - 5, mouse_y - 5, mouse_x + 5, mouse_y + 5);
      render.drawLine(mouse_x + 5, mouse_y - 5, mouse_x - 5, mouse_y + 5);
      if (System.currentTimeMillis() - mouse_press_time < 1000) {
        render.setColor(Color.RED);
View Full Code Here

TOP

Related Classes of org.rsbot.client.input.Mouse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.