|
11.
|
|
|
Screens are updated at the start of each interaction, and each time an interaction is restarted.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/screens.rst:44
|
|
12.
|
|
|
**Screen code must not cause side effects that are visible from outside the screen.** Ren'Py will run screen code multiple times, as it deems necessary. It runs screen code as part of the image prediction process, before the screen is first shown. As a result, if screen code has side effects, those side effects may occur at unpredictable times.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/screens.rst:47
|
|
13.
|
|
|
A screen has a scope associated with it, giving values to some variables. When a variable is accessed by a screen, it's first looked up in the scope, and then looked up as a global variable.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/screens.rst:54
|
|
14.
|
|
|
Screen Language
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/screens.rst:59
|
|
15.
|
|
|
The screen language is a mostly-declarative way of displaying screens. It consists of a statement that declares a new screen, statements that add displayables to that screen, and control statements.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/screens.rst:61
|
|
16.
|
|
|
Here's an example of a screen.::
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/screens.rst:66
|
|
17.
|
|
|
The first line of this is a screen statement, a Ren'Py language statement that's used to declare a screen. The name of the screen is `say`, so this is the screen that's used to display dialogue.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/screens.rst:76
|
|
18.
|
|
|
The screen contains a window, which has been given the id of "window". This window contains a vertical box, and the spacing inside that box is 10 pixels. It contains two text fields, one of the name of the speaker, and the other with the speaker's id.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/screens.rst:80
|
|
19.
|
|
|
Screen Language Syntax
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/screens.rst:86
|
|
20.
|
|
|
Most screen language statements share a common syntax. (Some of the control statements have other syntaxes.) A statement starts at the beginning of a line, with a keyword that introduces the statement.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
../../source/screens.rst:88
|