Changing message box graphic in-game

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
anms
Newbie
Posts: 1
Joined: Wed Dec 05, 2007 6:34 pm
Contact:

Changing message box graphic in-game

#1 Post by anms »

Is it possible to change message box graphic, and font color when in-game? Since I need this for my game - when all the other charas use white message box (special additional grapic) and black font, there's one that has to use black message box with white font.

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Changing message box graphic in-game

#2 Post by PyTom »

Sure. These are controlled by keyword arguments to Character. You can set the window background with window_background, and the color of text with what_color. So you can write:

Code: Select all

init:
    $ eviljim = Character("EvilJim", window_background="#000", what_color="#fff", color="#f00")
You could also use an image or frame for window_background.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Post Reply

Who is online

Users browsing this forum: No registered users