#apply
#include "../_include.txt"
#include "../../define/_const_pinball2.txt"

cev[CEV_SELECT_CTRL_TYPE] .name(">>>ピンボールの操作方法を選択") {
    def {
        LAY_MESSAGE = 6

        PIC_TEXT = 10

        TEXT_X = 0
        TEXT_Y = 80
        TEXT_WIDTH  = 320
        TEXT_HEIGHT = 80

        TEXT_A =
"\c[7]A TYPE\c[0]
左フリッパー:\c[2]Ｚ\c[0]  左ナッジ:\c[2]Ｘ\c[0]
右フリッパー:\c[2]$t\c[0]  右ナッジ:\c[2]$u\c[0]
プランジャー:\c[2]$v\c[0]  強制終了:\c[2]１を長押し\c[0]"
        TEXT_B =
"\c[7]B TYPE\c[0]
左フリッパー:\c[2]Shift\c[0]  左ナッジ:\c[2]Ｚ\c[0]
右フリッパー:\c[2]$t\c[0]  右ナッジ:\c[2]$s\c[0]
プランジャー:\c[2]$u\c[0]  強制終了:\c[2]１を長押し\c[0]
"
        TEXT_C =
"\c[7]C TYPE\c[0]
左フリッパー:\c[2]$v\c[0]  左ナッジ:\c[2]$s+$v\c[0]
右フリッパー:\c[2]$t\c[0]  右ナッジ:\c[2]$s+$t\c[0]
プランジャー:\c[2]$u\c[0]  強制終了:\c[2]１を長押し\c[0]"
    }

    def {
        baseStrPicCmd = {
            .size(TEXT_WIDTH, TEXT_HEIGHT)
            .chromakey(1)
            .font("", 12)
            .spacing(0, 4)
            .skin ""
            .mapLayer(LAY_MESSAGE)
            .eraseWhenTransfer
            .affectedByTint
            .affectedByFlash
            .affectedByShake
        }
    }

    @loop bl {
        @if pbControllMode == CTRL_TYPE_A bl {
            @pic.strpic [PIC_TEXT] TEXT_A .pos(TEXT_X, TEXT_Y) .topLeft baseStrPicCmd 
        } .elif pbControllMode == CTRL_TYPE_B bl {
            @pic.strpic [PIC_TEXT] TEXT_B .pos(TEXT_X, TEXT_Y) .topLeft baseStrPicCmd 
        } .elif pbControllMode == CTRL_TYPE_C bl {
            @pic.strpic [PIC_TEXT] TEXT_C .pos(TEXT_X, TEXT_Y) .topLeft baseStrPicCmd 
        }

        @msg.choice bl {
            .cancel(3)
            .case "\>\c[7]A TYPE \c[0](標準)" bl {
                pbControllMode = CTRL_TYPE_A
            }
            .case "\>\c[7]B TYPE \c[0](Xキー不使用)" bl {
                pbControllMode = CTRL_TYPE_B
            }
            .case "\>\c[7]C TYPE \c[0](片手操作)" bl {
                pbControllMode = CTRL_TYPE_C
            }
            .case "\>戻る" bl {
                @break
            }
        }
    }

    @pic.erase [PIC_TEXT] 
}