Single Core Posted July 19, 2014 Share Posted July 19, 2014 I'd like to simply hide my paint but I can't seem to get the MouseListener to function properly. Any input why this is happening? Link to comment Share on other sites More sharing options...
Dashboard Posted July 19, 2014 Share Posted July 19, 2014 Implement MouseListener in your main class (the class that extends Script). In onStart() add this line - bot.addMouseListener(this); Link to comment Share on other sites More sharing options...
Single Core Posted July 19, 2014 Author Share Posted July 19, 2014 Implement MouseListener in your main class (the class that extends Script). In onStart() add this line - bot.addMouseListener(this); Oh, Thanks. Link to comment Share on other sites More sharing options...
Apaec Posted July 19, 2014 Share Posted July 19, 2014 this.bot.addMouseListener(new java.awt.event.MouseListener() { @Override public void mouseClicked(MouseEvent e) { Point m = e.getPoint(); if (rectanglePaintToggle != null && rectanglePaintToggle.contains(m)) { if (!hidePaint) { hidePaint = true; } else { hidePaint = false; } } } @Override public void mouseEntered(MouseEvent arg0) { } @Override public void mouseExited(MouseEvent arg0) { } @Override public void mousePressed(MouseEvent arg0) { } @Override public void mouseReleased(MouseEvent arg0) { } }); Link to comment Share on other sites More sharing options...
Swizzbeat Posted July 19, 2014 Share Posted July 19, 2014 Implement BotMouseListener, it provides more features. 1 Link to comment Share on other sites More sharing options...
Joseph Posted July 19, 2014 Share Posted July 19, 2014 Implement BotMouseListener, it provides more features. it provides one extra feature Link to comment Share on other sites More sharing options...
Swizzbeat Posted July 19, 2014 Share Posted July 19, 2014 it provides one extra feature Which is an extra feature...? Link to comment Share on other sites More sharing options...
Phoenix21 Posted July 27, 2014 Share Posted July 27, 2014 Great idea! Link to comment Share on other sites More sharing options...