I had something similar set up in my previous novel that changed the style of the textbox:
Code: Select all
frame:
style_group "pref"
has vbox
label _("Textbox Style")
textbutton "Standard" action [SetField(persistent, "style", ""), Jump('pick_style1')]
textbutton "Plain" action [SetField(persistent, "style", "A"), Jump('pick_style2')]Code: Select all
label pick_style1:
$style.window.background = Frame("textbox1.png", 12, 12)
$style.rebuild()
return
label pick_style2:
$style.window.background = Frame("textbox2.png", 12, 12)
$style.rebuild()
returnCode: Select all
define k2 = Character(None, what_outlines=my_k)
define r = DynamicCharacter("player_name", color="#ffffff", show_two_window=True, what_outlines=my_r, who_outlines = [(3, "#79003f", 0, 0)],
# styling the namebox
# default is namebox1, change if otherwise
show_custom_who_background=ConditionSwitch(
"persistent.style == 'A'", "Namebox2A.png",
"True", "Namebox2.png",
)
)