Can I change styles in game - after "label start" ?

A place to discuss things that aren't specific to any one creator or game.
Forum rules
Ren'Py specific questions should be posted in the Ren'Py Questions and Annoucements forum, not here.
Post Reply
Message
Author
User avatar
tohtamish
Regular
Posts: 65
Joined: Thu Apr 29, 2010 4:56 am
Contact:

Can I change styles in game - after "label start" ?

#1 Post by tohtamish »

Tried "$ style.....", - doesnt work.
For example, changing color of interface during game - is it possible?.

Cironian
Regular
Posts: 33
Joined: Sun Aug 26, 2007 5:34 pm
Projects: Dragon Story
Contact:

Re: Can I change styles in game - after "label start" ?

#2 Post by Cironian »

You can do it if you call style.rebuild() after making your changes. But note the problems listed at http://www.renpy.org/wiki/renpy/doc/ref ... le.rebuild

Due to the limitations, it's better in most cases if you use a variable to switch to a different named style inside your UI code, instead of redefining the styles on the fly. Also, I think the changes made this way would not propagate down to styles inherited from the one you are changing. (Although I might be wrong on that)

So, to summarize: Yes, it's possible, but rarely advisable.

Post Reply

Who is online

Users browsing this forum: No registered users