This page is out of date

You've reached a page on the Ren'Py wiki. Due to massive spam, the wiki hasn't been updated in over 5 years, and much of the information here is very out of date. We've kept it because some of it is of historic interest, but all the information relevant to modern versions of Ren'Py has been moved elsewhere.

Some places to look are:

Please do not create new links to this page.


ウィンドウの表示・非表示

このレシピでは、ウィンドウを表示させたり、消したりする方法を見ていきます。ウィンドウを表示させるとはトランジションの間も含めて、常にウィンドウを表示するということです。また、ウィンドウを消しているときは、トランジションはウィンドウのない状態で実行されます。(ただし、ウィンドウが消えている状態でメッセージを表示しようとした場合、メッセージの間だけウィンドウは表示されます。)


init python:
    
    show_window_trans = MoveTransition(0.25,
                                       enter_factory=MoveIn((None, 
                                       1.0, None, 0.0)))

    hide_window_trans = MoveTransition(0.25,
                                       leave_factory=MoveOut((None, 
                                       1.0, None, 0.0)))
        
    def hide_window():
        store._window_during_transitions = False
        narrator("", interact=False)
        renpy.with_statement(None)
        renpy.with_statement(hide_window_trans)

    def show_window():
        narrator("", interact=False)
        renpy.with_statement(show_window_trans)
        store._window_during_transitions = True

これは次のように使います。

e "Let's go somewhere else!"

$ hide_window()

scene bg somewhere else
with dissolve

$ show_window()

e "We're here!"

ウィンドウを表示/非表示にするときのエフェクトを変更するには、show_window_transhide_window_trans を書き換えてください。