Different menu for each system.

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
User avatar
Prandygame
Newbie
Posts: 16
Joined: Tue Oct 06, 2020 10:10 pm
Completed: Romance Dimensional
Projects: Romance Dimensional 2
Organization: Prandy Game
itch: prandygame.itch.io
Contact:

Different menu for each system.

#1 Post by Prandygame » Tue Nov 03, 2020 12:36 pm

I have the following code recreating this menu, but apparently in the mobile version "Android" everything is distorted, I try to fix it but the last column despite having the same spaces and alignments behaves differently from the rest.
#Variables

Code: Select all

default xpox_r= 0
default  ypox_r= 360
default  xpox_s= 335
default  ypox_s= 550

default  espace_h=20
default  ypox_hbox= -100
default  xpox_hbox= -20

default  espace_vbox=20
default  xaling_vvbox=0.5
default  espace_vvbox=3

default  nullpixel=60
#The screen

Code: Select all

screen rutas_selec():
    #if renpy.variant("mobile"):
        tag menu

        ## This use statement includes the game_menu screen inside this one. The
        ## vbox child is then included inside the viewport inside the game_menu
        ## screen.
        use game_menu(_("rutas_selec")):

            text "{size=+15}{color=#00FEFA}~ Rutas secretas ~{/color}{/size}" xpos xpox_r ypos ypox_r
            text "{size=20}Haz una captura de pantalla.{/size}" xpos xpox_s ypos ypox_s
            hbox:

                spacing espace_h
                ypos ypox_hbox
                xpos xpox_hbox
                vbox:
                    spacing espace_vbox
                    add "gui/destinos/nat_menu.png"
                    vbox:

                        xalign xaling_vvbox
                        spacing espace_vvbox
                        if persistent.nat_ruta_1n:#completado
                            textbutton _("{font=gui/font/Alice.ttf}{color=#18DA79}Solo tú{/color}{/font}") action Notify(_("Solo tú me importas."))  hover_sound "gui/sonido1/boton_1.mp3"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}[persistent.nat_ruta_1code]{/color}{/font}"
                        else:
                            textbutton _("Bloqueado") action Notify(_("Contigo hasta el final."))  hover_sound "gui/sonido1/boton_2.wav"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}No hay codigo{/color}{/font}"
                        if persistent.nat_ruta_2n: #completado
                            textbutton _("{font=gui/font/Alice.ttf}{color=#FFFFFF}Celos{/color}{/font}") action Notify(_("Por mi inmadurez."))  hover_sound "gui/sonido1/boton_1.mp3"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}[persistent.nat_ruta_2code]{/color}{/font}"
                        else:
                            textbutton _("Bloqueado") action Notify(_("Cuando se pierde la madurez."))  hover_sound "gui/sonido1/boton_2.wav"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}No hay codigo{/color}{/font}"
                        if persistent.nat_ruta_3n: #completado
                            textbutton _("{font=gui/font/Alice.ttf}{color=#18DA79}Las tres{/color}{/font}") action Notify(_("Ya tengo dos."))  hover_sound "gui/sonido1/boton_1.mp3"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}[persistent.nat_ruta_3code]{/color}{/font}"
                        else:
                            textbutton _("Bloqueado") action Notify(_("Ellas seran mias."))  hover_sound "gui/sonido1/boton_2.wav"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}No hay codigo{/color}{/font}"
                        null height nullpixel

                        if persistent.nat_ruta_4n: #completado
                            textbutton _("{font=gui/font/Alice.ttf}{color=#18DA79}Ocultar{/color}{/font}") action Notify(_("Nunca debo decirle el secreto."))  hover_sound "gui/sonido1/boton_1.mp3"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}[persistent.nat_ruta_4code]{/color}{/font}"
                        else:
                            textbutton _("Bloqueado") action Notify(_("Ocultar mi verdad."))  hover_sound "gui/sonido1/boton_2.wav"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}No hay codigo{/color}{/font}"
                        if persistent.nat_ruta_5n:
                            ### para hacer esto se necesita regar todos los el.ec
                            #solo se activa si el jugador cumple los requisitos de un destino perfecto, todos los menus correctos seleccionados
                            textbutton _("{font=gui/font/Alice.ttf}{color=#FFFFFF}Perfecto{/color}{/font}") action Notify(_("Soy el amo del destino."))  hover_sound "gui/sonido1/boton_1.mp3"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}[persistent.nat_ruta_5code]{/color}{/font}"
                        else:
                            textbutton _("Bloqueado") action Notify(_("La jugada perfecta."))  hover_sound "gui/sonido1/boton_2.wav"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}No hay codigo{/color}{/font}"
                vbox:
                    spacing espace_vbox
                    add "gui/destinos/juni_menu.png"
                    vbox:
                        xalign xaling_vvbox
                        spacing espace_vvbox
                        if persistent.juni_ruta_1n: #completado
                            textbutton _("{font=gui/font/Alice.ttf}{color=#FFFFFF}Seras mia{/color}{/font}") action Notify(_("Tú me perteneces."))  hover_sound "gui/sonido1/boton_1.mp3"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}[persistent.juni_ruta_1code]{/color}{/font}"
                        else:
                            textbutton _("Bloqueado") action Notify(_("La atrevida es mia."))  hover_sound "gui/sonido1/boton_2.wav"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}No hay codigo{/color}{/font}"
                        if persistent.juni_ruta_2n: #completado
                            textbutton _("{font=gui/font/Alice.ttf}{color=#FFFFFF}Perverso{/color}{/font}") action Notify(_("Solo me deje llevar del bosque."))  hover_sound "gui/sonido1/boton_1.mp3"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}[persistent.juni_ruta_2code]{/color}{/font}"
                        else:
                            textbutton _("Bloqueado") action Notify(_("Yo a solas contigo."))  hover_sound "gui/sonido1/boton_2.wav"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}No hay codigo{/color}{/font}"
                        if persistent.juni_ruta_3n: #completado
                            #En este destino se fracasa porque Alice se molesta con el por consumir drogas y porque sufrio una desconexion de dimensión
                            textbutton _("{font=gui/font/Alice.ttf}{color=#FFFFFF}Alucinante{/color}{/font}") action Notify(_("Viaje a otras dimensiones."))  hover_sound "gui/sonido1/boton_1.mp3"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}[persistent.juni_ruta_3code]{/color}{/font}"
                        else:
                            textbutton _("Bloqueado") action Notify(_("Quiero viajar contigo a otra dimensión."))  hover_sound "gui/sonido1/boton_2.wav"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}No hay codigo{/color}{/font}"
                        null height nullpixel

                        if persistent.juni_ruta_4n: #completado
                            #le dice el secreto #ruta buena, juni le ayuda a buscar la maquina
                            textbutton _("{font=gui/font/Alice.ttf}{color=#18DA79}Te dije{/color}{/font}") action Notify(_("."))  hover_sound "gui/sonido1/boton_1.mp3"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}[persistent.juni_ruta_4code]{/color}{/font}"
                        else:
                            textbutton _("Bloqueado") action Notify(_("Le dire mi secreto."))  hover_sound "gui/sonido1/boton_2.wav"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}No hay codigo{/color}{/font}"
                        if persistent.juni_ruta_5n: #completado
                            #solo se activa el.ec12 de seriedad
                            textbutton _("{font=gui/font/Alice.ttf}{color=#18DA79}La jugada perfecta{/color}{/font}") action Notify(_("Soy el amo del destino."))  hover_sound "gui/sonido1/boton_1.mp3"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}[persistent.juni_ruta_5code]{/color}{/font}"
                        else:
                            textbutton _("Bloqueado") action Notify(_("El destino perfecto."))  hover_sound "gui/sonido1/boton_2.wav"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}No hay codigo{/color}{/font}"
                vbox:
                    spacing espace_vbox
                    add "gui/destinos/hana_menu.png"
                    vbox:
                        xalign xaling_vvbox
                        spacing espace_vvbox

                        if persistent.hana_ruta_1n:  #completado
                            textbutton _("{font=gui/font/Alice.ttf}{color=#18DA79}Te amo{/color}{/font}") action Notify(_("Nos declaramos, cuando regrese sera genial."))  hover_sound "gui/sonido1/boton_1.mp3"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}[persistent.hana_ruta_1code]{/color}{/font}"
                        else:
                            textbutton _("Bloqueado") action Notify(_("Conoces mi secreto, eres mi unico amor."))  hover_sound "gui/sonido1/boton_2.wav"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}No hay codigo{/color}{/font}"
                        if persistent.hana_ruta_2n:  #completado
                            #no sabe el secreto pero sospecha de el
                            textbutton _("{font=gui/font/Alice.ttf}{color=#FFFFFF}Curiosa{/color}{/font}") action Notify(_("Sospechas de mi, pero por el bien de todos, guardare el secreto."))  hover_sound "gui/sonido1/boton_1.mp3"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}[persistent.hana_ruta_2code]{/color}{/font}"
                        else:
                            textbutton _("Bloqueado") action Notify(_("Ella sospecha de mi."))  hover_sound "gui/sonido1/boton_2.wav"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}No hay codigo{/color}{/font}"
                        if persistent.hana_ruta_3n: #completado
                            textbutton _("{font=gui/font/Alice.ttf}{color=#FFFFFF}Demonios{/color}{/font}") action Notify(_("Niño insoportable, seguro traera problemas."))  hover_sound "gui/sonido1/boton_1.mp3"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}[persistent.hana_ruta_3code]{/color}{/font}"
                        else:
                            textbutton _("Bloqueado") action Notify(_("Un niño del infierno."))  hover_sound "gui/sonido1/boton_2.wav"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}No hay codigo{/color}{/font}"
                        null height nullpixel

                        if persistent.hana_ruta_4n: #completado

                            textbutton _("{font=gui/font/Alice.ttf}{color=#FFFFFF}Mentiroso{/color}{/font}") action Notify(_("¿Por qué tenia que hablar?"))  hover_sound "gui/sonido1/boton_1.mp3"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}[persistent.hana_ruta_4code]{/color}{/font}"
                        else:
                            textbutton _("Bloqueado") action Notify(_("Decir la verdad al sistema."))  hover_sound "gui/sonido1/boton_2.wav"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}No hay codigo{/color}{/font}"
                        if persistent.hana_ruta_5n: #completo
                            #El dios, solo se desbloquea si se cree en dios y si se escucho la historia de las almas
                            textbutton _("{font=gui/font/Alice.ttf}{color=#18DA79}Un dios{/color}{/font}") action Notify(_("Creo que tengo poderes"))  hover_sound "gui/sonido1/boton_1.mp3"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}[persistent.hana_ruta_5code]{/color}{/font}"
                        else:
                            textbutton _("Bloqueado") action Notify(_("Si tan solo pudiera tener poderes."))  hover_sound "gui/sonido1/boton_2.wav"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}No hay codigo{/color}{/font}"
                vbox:

                    spacing espace_vbox
                    if persistent.alice_ruta_1a:
                        add "gui/destinos/alice_menu.png"
                    else:
                        add "gui/destinos/inter_menu.png"
                    vbox:
                        xalign xaling_vvbox
                        spacing espace_vvbox

                        if persistent.alice_ruta_1n: #completo
                            #El jugador acepta viajar en el tiempo, pero su viaje fracasa porque el le pregunta a Alice  porque no lo hace viajar mas en el tiempo
                            textbutton _("{font=gui/font/Alice.ttf}{color=#18DA79}Fiel{/color}{/font}") action Notify(_("Salvaré al mundo."))  hover_sound "gui/sonido1/menumover.wav"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}[persistent.alice_ruta_1code]{/color}{/font}"
                        else:
                            textbutton _("Bloqueado") action Notify(_("Tengo que salvar este mundo."))  hover_sound "gui/sonido1/boton_2.wav"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}No hay codigo{/color}{/font}"
                        if persistent.alice_ruta_2n: #completo
                            textbutton _("{font=gui/font/Alice.ttf}{color=#18DA79}Movíl{/color}{/font}") action Notify(_("Tengo dos chicas en mi telefono."))  hover_sound "gui/sonido1/menumover.wav"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}[persistent.alice_ruta_2code]{/color}{/font}"
                        else:
                            textbutton _("Bloqueado") action Notify(_("Necesito un telefono."))  hover_sound "gui/sonido1/boton_2.wav"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}No hay codigo{/color}{/font}"
                        if persistent.alice_ruta_3n:
                            #se debe crear una ruta de romance con el sistema alice, solo se activa si todas las elecciones con Alice son buenas.
                            #En este destino Alice se vuelve buena y viaja al pasado a encontrarse con el jugador para salvarlo de la Alice mala.
                            textbutton _("{font=gui/font/Alice.ttf}{color=#18DA79}¿Amor?{/color}{/font}") action Notify(_("¿Se puede amar una maquina?"))  hover_sound "gui/sonido1/menumover.wav"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}[persistent.alice_ruta_3code]{/color}{/font}"
                        else:
                            textbutton _("Bloqueado") action Notify(_("Coquetear con un sistema."))  hover_sound "gui/sonido1/boton_2.wav"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}No hay codigo{/color}{/font}"

                        null height nullpixel

                        if persistent.alice_ruta_4n: #completo
                            textbutton _("{font=gui/font/Alice.ttf}{color=#FFFFFF}Pasado{/color}{/font}") action Notify(_("Las maquinas son frias y sin emoción."))  hover_sound "gui/sonido1/menumover.wav"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}[persistent.alice_ruta_4code]{/color}{/font}"
                        else:
                            textbutton _("Bloqueado") action Notify(_("Si pudiera viajar mas en el tiempo."))  hover_sound "gui/sonido1/boton_2.wav"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}No hay codigo{/color}{/font}"
                        if persistent.alice_ruta_5n: #completo
                            textbutton _("{font=gui/font/Alice.ttf}{color=#FFFFFF}Malvado{/color}{/font}") action Notify(_("Yo solo gozare este mundo."))  hover_sound "gui/sonido1/menumover.wav"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}[persistent.alice_ruta_5code]{/color}{/font}"
                        else:
                            textbutton _("Bloqueado") action Notify(_("Haré todo lo que quiera."))  hover_sound "gui/sonido1/boton_2.wav"
                            text "{font=gui/font/ruso.ttf}{color=#49D7FB}No hay codigo{/color}{/font}"
### pc view.
https://imgur.com/8iDFJCJ

### Movil view
https://imgur.com/8iDFJCJ

It doesn't matter if you move the hbox to the left, the last column keeps the light blue text in two lines.
My first game made in Renpy check it out.
https://prandygame.itch.io/visual-novel-romance

Xiael
Regular
Posts: 31
Joined: Thu Aug 06, 2020 9:13 am
itch: Xiael
Discord: message me first here
Contact:

Re: Different menu for each system.

#2 Post by Xiael » Fri Nov 06, 2020 2:01 pm

Hey I think you accidentally posted the same links for both views
Anime sprite commissions $30 per character: viewtopic.php?f=62&t=60703&p=536689#p536689

Post Reply

Who is online

Users browsing this forum: Bing [Bot]