VN game

I have started to write a new VN game but this time I want my script file to be translate into Thai language, This is what I have done:
screen main_menu:

    tag menu

    window:
        style "mm_root"

    frame:
        style_group "mm"
        xalign .98
        yalign .98

        has vbox
        
        if lang == "english":
            textbutton _("Start Game") action Start()
            textbutton _("Load Game") action ShowMenu("load")
            textbutton _("Preferences") action ShowMenu("preferences")
            textbutton _("Help") action Help()
            textbutton _("Quit") action Quit(confirm=False)
        elif lang == "thai":
            textbutton _("เริ่มเกม") action Start()
            textbutton _("โหลดเกม") action ShowMenu("load")
            textbutton _("การตั้งค่า") action ShowMenu("preferences")
            textbutton _("ช่วย") action Help()
            textbutton _("เลิก") action Quit(confirm=False)

init -2:
    style mm_button:
        size_group "mm"[/ICODE]

[ICODE]screen navigation:

    window:
        style "gm_root"

    frame:
        style_group "gm_nav"
        xalign .98
        yalign .98

        has vbox
        
        if lang == "english":
            textbutton _("Return") action Return()
            textbutton _("Preferences") action ShowMenu("preferences")
            textbutton _("Save Game") action ShowMenu("save")
            textbutton _("Load Game") action ShowMenu("load")
            textbutton _("Main Menu") action MainMenu()
            textbutton _("Help") action Help()
            textbutton _("Quit") action Quit()
        elif lang == "thai":
            textbutton _("กลับ") action Return()
            textbutton _("การตั้งค่า") action ShowMenu("preferences")
            textbutton _("บันทึกเกม") action ShowMenu("save")
            textbutton _("โหลดเกม") action ShowMenu("load")
            textbutton _("เมนูหลัก") action MainMenu()
            textbutton _("ช่วย") action Help()
            textbutton _("เลิก") action Quit()

init -2:
    style gm_nav_button:
        size_group "gm_nav"[/ICODE]

[ICODE]screen file_picker:

    frame:
        style "file_picker_frame"

        has vbox

        hbox:
            style_group "file_picker_nav"

        if lang == "english":       
            textbutton _("Previous"):
                action FilePagePrevious()

            textbutton _("Auto"):
                action FilePage("auto")

            textbutton _("Quick"):
                action FilePage("quick")

            for i in range(1, 9):
                textbutton str(i):
                    action FilePage(i)

            textbutton _("Next"):
                action FilePageNext()
                
         elif lang == "thai":
            textbutton _("<xton>Previous"):
                action FilePagePrevious()

            textbutton _("<xton>Auto"):
                action FilePage("auto")

            textbutton _("<xton>Quick"):
                action FilePage("quick")

            for i in range(1, 20):
                textbutton str(i):
                    action FilePage(i)
                    
            textbutton _("<xton>Next"):
                action FilePageNext()

        $ columns = 2
        $ rows = 8[/ICODE]

[ICODE]screen preferences:

    tag menu

    use navigation

    grid 3 1:
        style_group "prefs"
        xfill True

        vbox:
            frame:
                style_group "pref"
                has vbox

                 if lang == "english":
                    label _("Display")
                    textbutton _("Window") action Preference("display", "window")
                    textbutton _("Full Screen") action Preference("display", "fullscreen")
                elif lang == "thai":
                    label _("Display")
                    textbutton _("Window") action Preference("display", "window")
                    textbutton _("Full Screen") action Preference("display", "fullscreen")

With these codes I can choose the language from the "Preference" but what I want to ask is that, how to create another page containing 2 vbox like there are in Preference above but an entirely different page, a page before a main menu page?

Comments

Sign In or Register to comment.