As the title says, I've been trying to figure out the best way to change the textbox colour from red to grayscale for use in certain scenes.
So what I did was define a new grayscale image via:
Code: Select all
image textbox gray = im.MatrixColor(
"gui/textbox.png",
im.matrix.desaturate() * im.matrix.tint(1.0, 1.0, 1.0))
OPTION 1:
Defining a new textbox via:
Code: Select all
init:
$ narrator = Character(None, window_background="textbox gray", window_height=278, window_xalign=0.5, window_yalign=1.0)
OPTION 2:
Tried defining a grayscaletext variable as false and then inserting this line of code into the style window:
Code: Select all
style window:
xalign 0.5
xfill True
yalign gui.textbox_yalign
ysize gui.textbox_height
if grayscaletext:
background Image("textbox gray", xalign=0.5, yalign=1.0)
else:
background Image("gui/textbox.png", xalign=0.5, yalign=1.0)
OPTION 3:
I tried inserting the grayscaletext variable into screen say but that just turned into a mess and I was having the textbox appearing and disappearing at random times:
Code: Select all
screen say(who, what):
style_prefix "say"
window:
id "window"
if who is not None:
window:
id "namebox"
style "namebox"
text who id "who"
else:
if graytext:
background Image("textbox gray", xalign=0.5, yalign=1.0)
else:
background Image("gui/textbox.png", xalign=0.5, yalign=1.0)
text what id "what"
I'm at my wits end, would really really appreciate help!
Thanks again!