Nex 2542 Share Posted May 14, 2017 Point mP = getMouse().getPosition(); g.setStroke(new BasicStroke(3)); g.setColor(Color.MAGENTA); g.drawLine(mP.x - 6, mP.y + 6, mP.x + 6, mP.y - 6); g.drawLine(mP.x + 6, mP.y + 6, mP.x - 6, mP.y - 6); g.setColor(Color.BLUE); g.drawLine(mP.x - 5, mP.y + 5, mP.x + 5, mP.y - 5); g.drawLine(mP.x + 5, mP.y + 5, mP.x - 5, mP.y - 5); g.setColor(Color.CYAN); g.drawLine(mP.x - 4, mP.y + 4, mP.x + 4, mP.y - 4); g.drawLine(mP.x + 4, mP.y + 4, mP.x - 4, mP.y - 4); g.setColor(Color.GREEN); g.drawLine(mP.x - 3, mP.y + 3, mP.x + 3, mP.y - 3); g.drawLine(mP.x + 3, mP.y + 3, mP.x - 3, mP.y - 3); g.setColor(Color.YELLOW); g.drawLine(mP.x - 2, mP.y + 2, mP.x + 2, mP.y - 2); g.drawLine(mP.x + 2, mP.y + 2, mP.x - 2, mP.y - 2); g.setColor(Color.RED); g.drawLine(mP.x - 1, mP.y + 1, mP.x + 1, mP.y - 1); g.drawLine(mP.x + 1, mP.y + 1, mP.x - 1, mP.y - 1); ^put this in you're onPaint Result: < mouse will look like dis Link to comment Share on other sites More sharing options...
Hashtag 8707 Share Posted May 14, 2017 Not bad . Link to comment Share on other sites More sharing options...
Parukantis 0 Share Posted May 14, 2017 Nice ;p Link to comment Share on other sites More sharing options...
Nex 2542 Author Share Posted May 14, 2017 simply rip cpu FashionScape innit Link to comment Share on other sites More sharing options...
Eclipseop 194 Share Posted May 14, 2017 A fori loop would have saved a lot of lines xd Link to comment Share on other sites More sharing options...
Donald Trump 333 Share Posted May 15, 2017 Cool! Link to comment Share on other sites More sharing options...
Eclipseop 194 Share Posted May 15, 2017 if you have a suggestion you have to post the code for it dont have ur color array defined in ur render ofc Link to comment Share on other sites More sharing options...
Eclipseop 194 Share Posted May 15, 2017 Thanks @Eclipseop this will probably be useful for alot of new people, but they will probably just straight copy paste it so might move the array out for convenience, I'll do it for you, also we are on DreamBot here so your suggestion should be client oriented. private final Color[] COLORS = {Color.RED, Color.YELLOW, Color.GREEN, Color.CYAN, Color.BLUE, Color.MAGENTA}; @Override public void onPaint(Graphics g) { Graphics2D graphics2D = (Graphics2D) g; graphics2D.setStroke(new BasicStroke(3)); final Point location = getMouse().getPosition(); for (int i = COLORS.length - 1; i >= 0; i--) { graphics2D.setColor(COLORS[i]); graphics2D.drawLine(location.x - i, location.y + i, location.x + i, location.y - i); graphics2D.drawLine(location.x + i, location.y + i, location.x - i, location.y - i); } } the point of the picture was so leeches don't straight copy and paste you dum Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.