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
Posts: 11
Joined: Wed Mar 06, 2019 4:56 pm
Location: Brazil

Image maps in splashscreen

#1 Post by FurFles- » Sat May 04, 2019 10:02 pm

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

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
Eileen-Class Veteran
Posts: 1446
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love, unknown
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain

Re: Image maps in splashscreen

#2 Post by xavimat » Sun May 05, 2019 12:21 pm

(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
                $ persistent.language_selected = True
                $ renpy.change_language("english")
                $ persistent.language_selected = True
                $ renpy.change_language(None)
In "screens.rpy", in the "preferences" screen:

Code: Select all

                if main_menu:
                        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: Google [Bot], Imperf3kt