Features:
- Open an entry by clicking on text
Scrollable text field
Close button
Translation friendly
To set up the note, use the following code. I put the note-related code in its own file, but you can put this in screens.rpy
Code: Select all
screen note(notetext):
modal True ##stops the user from clicking to continue while this is open
style_group "note"
frame:
ysize 200
padding (5,5)
viewport:
draggable True mousewheel True ##This will allow the text to exceed the boundaries of the box.
vbox:
spacing 10
box_wrap True
#label _("Note") ##Uncomment the label to have the heading "Note"
text _(notetext)
vbox:
align (0.0, 1.0) ##puts this on the bottom
textbutton _("Close") action Hide("note")
The note has two parts. The first is the note itself. I put this in the same file as the screen, but you can put this in script.rpy
Code: Select all
label example:
show screen note("Notes look like this.")
$renpy.restart_interaction() #Allows ren'py to continue from the current point
Code: Select all
"I have added {a=jump:example}notes{/a}."