Ren'Py memo

Ren'Pyの個人的なメモ

Ren'Py没コード

・画像選択
・ボタンの中身をプレイヤーに選択してもらう変更できるボタン



screen syudans():

    hbox:
        xalign 0.5
        yalign 0.3
        imagebutton action Call('syudan_',1):
            idle "choiceA.webp"
            hover "choiceA2.webp"
            selected "choiceA2.webp"
            alt _("刺す")
            at one_trans

        if whois == 1 and (persistent.cheat == True or persistent.sueA == True):
            add "check" ypos 0 xpos 0

        null width 100

        imagebutton action Call('syudan_',2):
            idle "choiceB.webp"
            hover "choiceB2.webp"
            selected "choiceB2.webp"
            alt _("スマホを見る")
            at one_trans

ボタンの中身をプレイヤーに選択してもらう変更できるボタン

        hbox:
            style_prefix "radio"
            label _("歯車ボタンカスタム")
            textbutton _("オプション") action SetVariable("persistent.hagu", "option")
            null width 10
            textbutton _("セーブ") action SetVariable("persistent.hagu", "save")

        null height 20

        hbox:
            style_prefix "check"
            label ""
            null height 10
            textbutton _("ロード") action SetVariable("persistent.hagu", "load")
            null width 10
            textbutton _("バックログ") action SetVariable("persistent.hagu", "log")

        null height 40
default persistent.hagu = "option"
            if persistent.hagu =="option":
                imagebutton:
                    xpos 960
                    ypos 290
                    idle "opt.webp"
                    hover "opt2.webp"
                    insensitive "opt3"
                    alt _("オプション")
                    action ShowMenu('preferences')
                    at skip_trans1
            elif persistent.hagu =="save":
                imagebutton:
                    xpos 960
                    ypos 290
                    idle "save.webp"
                    hover "save2.webp"
                    insensitive "save3"
                    alt _("セーブ")
                    action ShowMenu('save')
                    at skip_trans1
            elif persistent.hagu =="load":
                imagebutton:
                    xpos 960
                    ypos 290
                    idle "load.webp"
                    hover "load2.webp"
                    insensitive "load3"
                    alt _("ロード")
                    action ShowMenu('load')
                    at skip_trans1
            elif persistent.hagu =="log":
                imagebutton:
                    xpos 960
                    ypos 290
                    idle "log.webp"
                    hover "log2.webp"
                    insensitive "log3"
                    alt _("バックログ")
                    action ShowMenu('history')
                    at skip_trans1