Image maps in splashscreen

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
FurFles-
Newbie
Posts: 11
Joined: Wed Mar 06, 2019 4:56 pm
Location: Brazil
Contact:

Image maps in splashscreen

#1 Post 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?

User avatar
xavimat
Eileen-Class Veteran
Posts: 1461
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Discord: xavimat
Contact:

Re: Image maps in splashscreen

#2 Post 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.
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

Post Reply

Who is online

Users browsing this forum: No registered users