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

2021/8/31

Changing colour of text

xixEmilyxix xixEmilyxix

2021/8/31

#
I was just wondering how to change the colour of the text from white to black, is there a way to do this? This is the code I have:
      getWorld().showText("" + beeValue, 400, 130);
danpost danpost

2021/8/31

#
xixEmilyxix wrote...
I was just wondering how to change the colour of the text from white to black, is there a way to do this? This is the code I have: << Code Omitted >>
You cannot change how showText displays its text. However, it does use a font (an outlined text) that will show with any background color. There is another way to accomplish what you want -- by creating the text image and either directly drawing it onto the background of the world or applying it to an actor that is added into the world. Please refer to my Value Display Tutorial scenario for more information on this topic.
You need to login to post a reply.