Apaec Posted April 12, 2014 Share Posted April 12, 2014 (edited) I noticed a few people have been using a paint to cover the name of the user of their script (like this:) So here is the code for you to do that. private final Color colour1 = new Color(0, 0, 0); //Black Put that ^^^ outside of your onPaint() block to define a colour in which to paint the rectangle. If you want more unique colours visit THIS PAGE to generate your own colour. To implement the colour its just private final Color colour1 = new Color(R Value, G Value, B Value); Then, in your onPaint() block you are going to want to drop this: public void onPaint(Graphics g) { Graphics2D gr = (Graphics2D) g; gr.setColor(colour2); //<----- Sets colour of rectangle gr.fillRect(7, 460, 100, 14); //<----- Sets dimensions of rectangle (x,y,width,height) } And there you have it! name covered Edited April 12, 2014 by Apaec 1 Link to comment Share on other sites More sharing options...
Kittens Posted April 12, 2014 Share Posted April 12, 2014 will use in future ty 1 Link to comment Share on other sites More sharing options...
Joseph Posted April 13, 2014 Share Posted April 13, 2014 public void onPaint(Graphics g) { Graphics2D gr = (Graphics2D) g; gr.setColor(Color.black); //<----- Sets colour of rectangle gr.fillRect(7, 460, 100, 14); //<----- Sets dimensions of rectangle (x,y,width,height) } 1 Link to comment Share on other sites More sharing options...
oTroll Posted April 13, 2014 Share Posted April 13, 2014 I know this is so offtopic, but do you know how to add a button that hides/shows the paint? Link to comment Share on other sites More sharing options...
Guest Apogee Posted April 13, 2014 Share Posted April 13, 2014 You need two images. The paint, and the button to open/close paint.After you have that, have a look at this. (Make sure you have the button in the topright of the chatbox. :P http://osbot.org/forum/topic/46251-hide-and-unhiding-paint/ 1 Link to comment Share on other sites More sharing options...
Apaec Posted April 13, 2014 Author Share Posted April 13, 2014 I know this is so offtopic, but do you know how to add a button that hides/shows the paint? You need two images. The paint, and the button to open/close paint. After you have that, have a look at this. (Make sure you have the button in the topright of the chatbox. http://osbot.org/forum/topic/46251-hide-and-unhiding-paint/ Yeah that topic seems to cover it well. If you have any other questions about this pm me Link to comment Share on other sites More sharing options...
oTroll Posted April 13, 2014 Share Posted April 13, 2014 You need two images. The paint, and the button to open/close paint. After you have that, have a look at this. (Make sure you have the button in the topright of the chatbox. http://osbot.org/forum/topic/46251-hide-and-unhiding-paint/ Thanks Link to comment Share on other sites More sharing options...
Guest Apogee Posted April 13, 2014 Share Posted April 13, 2014 Thanks Absolutely. I've been spam-asking questions all around the forums trying to get answers. So if you have a nooby-ish questions like that, i can probably answer it :P Link to comment Share on other sites More sharing options...
ProbsNotAssumeTb Posted April 16, 2014 Share Posted April 16, 2014 (edited) Dis is da shitty way to do eht. Betta way is dis Color da_good_good_colla = new Color(178, 163, 132); use sum dat string metrics shit get dat string pixel length oooooo string pixel length draw dat nice long rectangle box with dat nice string pixel length plus bout a 2 damnnnnn now u got dat matching color matchin length block ooo oooo look how assume did da tellin Edited April 16, 2014 by ProbsNotAssumeTb Link to comment Share on other sites More sharing options...
Noterickho123 Posted April 16, 2014 Share Posted April 16, 2014 Dis is da shitty way to do eht. Betta way is dis Color da_good_good_colla = new Color(178, 163, 132); use sum dat string metrics shit get dat string pixel length oooooo string pixel length draw dat nice long rectangle box with dat nice string pixel length plus bout a 9 damnnnnn now u got dat matching color matchin length block ooo oooo look how assume did da tellin i got cleaned because u dumbfuck - hanks 1 Link to comment Share on other sites More sharing options...