Page 1 of 1

Dynamically change text frame? [Solved]

Posted: Sat Nov 06, 2010 10:50 pm
by Formedras
Is it possible to change style.window.background after the game starts or to use a ConditionSwitch to achieve the same result?

Re: Dynamically change text frame?

Posted: Sat Nov 06, 2010 11:05 pm
by Formedras
Never mind. I figured it out, through the DynamicDisplayable function. Just needed to take the example and change "gm_root" to "window".

Thus:

Code: Select all

    window_background = "frame.png"

    def text_window_background(st, at):
        return window_background, None

    style.window.background = DynamicDisplayable(text_window_background)
Do note that I changed variable names and the file name from the example to match what I needed.