- Aug 4, 2020
- 925
- 1,460
Hi, I want to make an option in the game that allows you to see the dark background of the texbox or not.
I have taken the following steps:
In script.rpy:
In screens.rpy:
In screens.rpy -screen preferences()-
and:
And I get the following error:
What am I doing wrong? Thank you for your help.
I have taken the following steps:
In script.rpy:
Code:
label splashscreen:
$ ChangeTBox()
return
Code:
init -1 python:
if persistent.tbox is None:
persistent.tbox = False
def ChangeTBox():
gui.tbox = persistent.tbox
Code:
vbox:
style_prefix "radio"
label _("Textbox")
textbutton _("Yes") action [SetVariable("persistent.tbox", True), ChangeTBox]
textbutton _("No") action [SetVariable("persistent.tbox", False), ChangeTBox]
Code:
style window:
xalign 0.5
xfill True
yalign gui.textbox_yalign
ysize gui.textbox_height
if gui.tbox:
background Image("gui/textbox.png", xalign=0.5, yalign=1.0)
Code:
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.
File "game/screens.rpy", line 155: end of line expected.
if gui.tbox:
^
Ren'Py Version: Ren'Py 7.3.5.606
Mon Dec 28 15:25:56 2020
What am I doing wrong? Thank you for your help.