Ren'Py memo

Ren'Pyの個人的なメモ

中身のカスタムができるボタンをつける

記述例

options.rpy

default persistent.hagu = "pre"

screen quick_menu

imagebutton:
    auto "gui/log_%s.png"
    activate_sound "audio/se_akch.ogg"
    if persistent.hagu =="pre":
        action ShowMenu('preferences')
    elif persistent.hagu =="sav":
        action ShowMenu('save')
    elif persistent.hagu =="loa":
        action ShowMenu('load')
    elif persistent.hagu =="his":
        action ShowMenu('history')

screen preferences

vbox:
    xpos 55
    style_prefix "radio"
    label _("歯車ボタンのカスタム")
    null height (2)
    textbutton _("オプション") action SetField(persistent, "hagu", "pre")
    textbutton _("セーブ") action SetField(persistent, "hagu", "sav")
    textbutton _("ロード") action SetField(persistent, "hagu", "loa")
    textbutton _("バックログ") action SetField(persistent, "hagu", "his")