This site requires JavaScript, please enable it in your browser!
Greenfoot back
Miguel.Valdez
Miguel.Valdez wrote ...

2018/3/29

transparent background

Miguel.Valdez Miguel.Valdez

2018/3/29

#
so on a sign of "GAME OVER" i am trying to make the background transparent but can seem to figure it out.... I wish "Color.TRANSPARENT" was an option hahah. This is what I have now, the background being black.
1
2
3
4
public GameOver()
{
    setImage(new GreenfootImage("Game Over", 285, Color.RED, Color.BLACK));
}
i have refered to this colors but not sure how to but a transparent color on my background besides changing the RGB colors to (0,0,0,0)
Super_Hippo Super_Hippo

2018/3/29

#
Use 'new Color(0, 0, 0, 0)' instead of 'Color.BLACK'.
Miguel.Valdez Miguel.Valdez

2018/3/29

#
Yup, I ended up figuring it out... except g reenfoot wouldn't let me post until this post was reviewed.
Yehuda Yehuda

2018/3/30

#
You were able to post even before "this post was reviewed".
danpost danpost

2018/3/30

#
Yehuda wrote...
You were able to post even before "this post was reviewed".
Enough with the semantics battles. You now right well Migue.Valez meant "that post was reviewed" (referring to the original post with the link in it).
You need to login to post a reply.