Code: Select all
###by 7dots Ruslan Nebykov
init -1 python:
# game window in the center of the screen
import os
os.environ ['SDL_VIDEO_CENTERED'] = '1'
# automatic image ads
config.automatic_images_minimum_components = 1
config.automatic_images = ['', '_', '/']
config.automatic_images_strip = ['images']
style.default.font = "fonts / AnimeAceV3.ttf"
style.default.size = 22
init:
# position of the left page
transform lf ():
xpos .5 xanchor 1.0 yalign .5
# position of the right page
transform rg ():
xpos .5 xanchor 0.0 yalign .5
# right to center (scrolling right to center)
transform r2c (delay = .25):
xpos .5 xanchor 0.0 xzoom 1.0 yalign .5
easeout delay xzoom 0.001
# center to left (scrolling from the center to the left)
transform c2l (delay = .25):
xpos .5 xanchor 1.0 xzoom .001 yalign .5
easein delay xzoom 1.0
init python:
# flipping
# first new pages, then old
# if the page is not specified, it will be empty
def pflip (new1 = "pageleft", new2 = "pageright", old1 = "pageleft", old2 = "pageright", delay = .5):
renpy.hide ("pleft")
renpy.hide ("pright")
renpy.show (old1, [lf ()], tag = "pleft")
renpy.show (new2, [rg ()], tag = "pright")
renpy.show (old2, [r2c (delay * .5)], tag = "plist")
renpy.pause (delay * .5)
renpy.show (new1, [c2l (delay * .5)], tag = "plist")
renpy.pause (delay * .5)
renpy.show (new1, [lf ()], tag = "pleft")
renpy.show (new2, [rg ()], tag = "pright")
renpy.hide ("plist")
label start:
scene expression "# 445"
show pagebook with dissolve
"Now look through the book. Just click on the screen."
# from blank to title
$ pflip ("page0", "page1")
pause
# title to text
$ pflip ("page2", "page3", "page0", "page1")
pause
# go back to empty pages
$ pflip (old1 = "page2", old2 = "page3")
"The remaining pages are empty for some reason."
# from empty to empty
$ pflip ()
"Well, there is no point flipping further."
# remove pages from the screen and the book itself
hide pleft
hide pright
hide pagebook
with dissolve
return
2) Menu in the form of an animation of a page
Download - http://renpyfordummies.blogspot.com/201 ... 5.html?m=1