This site requires JavaScript, please enable it in your browser!
Greenfoot back

RcCookie's Comments

Back to RcCookie's profile

You might even wanna take a look at my ui project including a text class that is specificity designed for that: https://www.greenfoot.org/scenarios/26443
RcCookieRcCookie

2020/10/28

You mean that it is adjustable?
That's gonna be a long piece of code
Your right - setTransparency(int) changes the transparency of the whole image. If you want to create images by hand or from a downloaded one and make some parts transparent, simply try for example Paint3D. Basically any image editor I can think of, except Paint. Just make sure to export it as .png
You can do that in Greenfoot using image.setTransparency(0-255) where image is an instance of GreenfootImage or for colors new Color(redValue, greenValue, blueValue, transparency)
Using for example: public String getName() { UserInfo user = Greenfoot.getUserInfo(); if(user == null) return "Greenfoot User"; return user.getUserName(); }
You could make it so that in the start menu the username that you are logged in with is shown instead of just "Greenfoot User"
@DatHeroAndy When you simply draw the shapes onto the painting and the color is somewhat transparent, the color gets darker the longer you hold onto the same place, and that quicker, if the framerate is higher. Also, you can see the steps of the single frames drawing for example a circle because where two half-transparent shapes overlay, they will be darker. To encounter this problem, you first draw onto a different image that is shown above, with full density, but the image is transparent. When you stop drawing, the overlaying image with the changes gets copied onto the real image, pixel by pixel. This lags.
@Roshan123 Just click on it ;-) Or adjust the 4 sliders for RGB and transparency