[Solved]Change viewport's background collor.

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
Doeny
Regular
Posts: 26
Joined: Wed Sep 07, 2022 8:28 pm
Contact:

[Solved]Change viewport's background collor.

#1 Post by Doeny » Sat Oct 08, 2022 12:47 pm

I tried making an scrollabre gallery, but after adding frame with viewport, the background area turned out to be white. Is there a way to change it's color?
Last edited by Doeny on Sat Oct 08, 2022 1:21 pm, edited 1 time in total.

User avatar
laure44
Regular
Posts: 60
Joined: Mon Mar 08, 2021 10:55 pm
Projects: Arkan'sTower, Gemshine Lorelei!
Location: France
Contact:

Re: Change viewport's background collor.

#2 Post by laure44 » Sat Oct 08, 2022 1:11 pm

You can use the background property for your frame. It takes a displayable, so you can use Solid to change the background color.

https://www.renpy.org/doc/html/style_pr ... background

Here's an example:

Code: Select all

frame:
    background Solid("#000")
I suppose the reason why your frame is white is because your game uses one of the white GUI themes, and frames use the "gui/frame.png" image by default (which in this case is white).

Doeny
Regular
Posts: 26
Joined: Wed Sep 07, 2022 8:28 pm
Contact:

Re: Change viewport's background collor.

#3 Post by Doeny » Sat Oct 08, 2022 1:21 pm

laure44 wrote:
Sat Oct 08, 2022 1:11 pm
You can use the background property for your frame. It takes a displayable, so you can use Solid to change the background color.

https://www.renpy.org/doc/html/style_pr ... background

Here's an example:

Code: Select all

frame:
    background Solid("#000")
I suppose the reason why your frame is white is because your game uses one of the white GUI themes, and frames use the "gui/frame.png" image by default (which in this case is white).
Thankies

Post Reply

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot]