Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Font color change

o.o

Member

This is most probably a very simple thing but, I totally suck at scripting.... Anyway I was wondering where in the script you change the font color. I've found where to change the font itself. But that's about it.
if I could I'd just like to change the color in the battle window. I'm pretty sure it's possible... Any help would be greatly appreciated!
 

ccoa

Member

...That won't work for the battle status window, Mr. Poofy.

Find the window you want to change in the script editor. In this case, I think you want Window_BattleStatus. Look for this line:

Code:
    self.contents = Bitmap.new(width - 32, height - 32)

Add after it:

Code:
    self.contents.font.color = Color.new(r, g, b, a)

Replacing r, g, b, and a with the red, green, blue, and alpha values of the color you want, respectively.

For example, opaque black would be:


Code:
    self.contents.font.color = Color.new(0, 0, 0, 255)

Note that this won't work for all windows, since this line might appear in a parent class. In those cases, it will require more scripting.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top