Jump to content

Name Covering Paint


Apaec

Recommended Posts

I noticed a few people have been using a paint to cover the name of the user of their script (like this:)

 ca883d0a2c3d2e36830a349b50c4aa4d.png

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

c362cf739eebd937a9aee42476f2c173.png

	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 smile.png

 

Edited by Apaec
  • Like 1
Link to comment
Share on other sites

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. tongue.png

 

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

Guest Apogee

Thanks smile.png

 

 

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

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 by ProbsNotAssumeTb
Link to comment
Share on other sites

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

  • Like 1
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...