Page 1 of 1

Image maps in splashscreen

Posted: Sat May 04, 2019 10:02 pm
by FurFles-
Hello again guys, I'm developing a game in 2 languages

And wanted to know how to display a splash screen with an image map for language selection

Simulation:
Player opens the game, and the first thing that appears and the screen with the language selection

Can you help with this, please?

Re: Image maps in splashscreen

Posted: Sun May 05, 2019 12:21 pm
by xavimat
(Sorry, but this questions belongs to another subforum: "Ren'Py Questions and Announcements", not "Development of Ren'Py")

Anyway, this is how I do it:
Use the special label "before_main_menu", and add a selector in the "preferences" screen:
(My main language is "Spanish" and the translation is "English", Change this according to your languages)

Code: Select all

label before_main_menu:
    if persistent.language_selected is None:
        scene bg select_language
        menu:
            "English":
                $ persistent.language_selected = True
                $ renpy.change_language("english")
            "Español":
                $ persistent.language_selected = True
                $ renpy.change_language(None)
    return
In "screens.rpy", in the "preferences" screen:

Code: Select all

                if main_menu:
                    vbox:
                        style_prefix "radio"
                        label _("Idioma")
                        textbutton "English" action Language("english")
                        textbutton "Español" action Language(None)
I use "if main_menu" allowing the player change the language only when accessing the preferences from the main menu, not in-game.