Positioning and screen

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
zabuzaeldemonio
Regular
Posts: 78
Joined: Sun Jan 08, 2017 7:24 pm
Contact:

Positioning and screen

#1 Post by zabuzaeldemonio » Sat Jan 20, 2018 10:08 pm

Hi guys, I tell you my problem, I'm using screens for a kind of diary, on the right I have this:

Code: Select all

screen shun:
    tag menu # This ensures that any other menu screen is replaced.
    add "gui/libro.png" # We add the image that is shown in the background of the preferences screen.
    
    imagebutton auto "gui/inicio_%s.png" xpos 0 ypos 0 focus_mask True action ShowMenu('libro') activate_sound ("musica/menu/Blip2.wav") hovered [ Play ("test_alz2", "sfx/click.wav")]

    use personajes
    
    
    imagebutton auto "gui/shun/shun_%s.png" xpos 1100 ypos 50 focus_mask
    
    imagebutton auto "gui/shun/primero_%s.png" xpos 1100 ypos 450 focus_mask
    
    if shun:
        imagebutton auto "gui/shun/secpos_%s.png" xpos 1100 ypos 550 focus_mask
    elif inmortalidad:
        imagebutton auto "gui/shun/terpos_%s.png" xpos 1100 ypos 550 focus_mask
        
    
    imagebutton auto "gui/flechar_%s.png" xpos 1600 ypos 900 focus_mask True action ShowMenu('shun2') activate_sound ("musica/menu/Blip2.wav") hovered [ Play ("test_one", "sfx/click.wav")]
    
and on the left this

Code: Select all

screen personajes:
    tag menu # This ensures that any other menu screen is replaced.
    add "gui/libro.png" # We add the image that is shown in the background of the preferences screen.

    imagebutton auto "gui/inicio_%s.png" xpos 0 ypos 0 focus_mask True action ShowMenu('libro') activate_sound ("musica/menu/Blip2.wav") hovered [ Play ("test_alz2", "sfx/click.wav")]
    
    imagebutton auto "gui/takashi_%s.png" xpos 300 ypos 300 focus_mask True action ShowMenu('takashi') activate_sound ("musica/menu/Blip2.wav") hovered [ Play ("test_one", "sfx/click.wav")]
    if shuncontacto:
        imagebutton auto "gui/2shun_%s.png" xpos 300 ypos 350 focus_mask True action ShowMenu('shun') activate_sound ("musica/menu/Blip2.wav") hovered [ Play ("test_one", "sfx/click.wav")]
    else:
        imagebutton auto "gui/1_%s.png" xpos 300 ypos 350 focus_mask
    if elzbietacontacto:
         imagebutton auto "gui/3elzbieta_%s.png" xpos 300 ypos 400 focus_mask True action ShowMenu('elzbieta') activate_sound ("musica/menu/Blip2.wav") hovered [ Play ("test_one", "sfx/click.wav")]
    else:
        imagebutton auto "gui/1_%s.png" xpos 300 ypos 400 focus_mask
    if aicontacto:
        imagebutton auto "gui/4ai_%s.png" xpos 300 ypos 450 focus_mask True action ShowMenu('ai') activate_sound ("musica/menu/Blip2.wav") hovered [ Play ("test_one", "sfx/click.wav")]
    else:
        imagebutton auto "gui/1_%s.png" xpos 300 ypos 450 focus_mask
    if jackcontacto:
        imagebutton auto "gui/5jack_%s.png" xpos 300 ypos 500 focus_mask True action ShowMenu('jack') activate_sound ("musica/menu/Blip2.wav") hovered [ Play ("test_one", "sfx/click.wav")]
    else:
        imagebutton auto "gui/1_%s.png" xpos 300 ypos 500 focus_mask
    if noelcontacto:
        imagebutton auto "gui/6noel_%s.png" xpos 300 ypos 550 focus_mask True action ShowMenu('noel') activate_sound ("musica/menu/Blip2.wav") hovered [ Play ("test_one", "sfx/click.wav")]
    else:
        imagebutton auto "gui/1_%s.png" xpos 300 ypos 550 focus_mask
    if robertocontacto:
        imagebutton auto "gui/7roberto_%s.png" xpos 300 ypos 600 focus_mask True action ShowMenu('roberto') activate_sound ("musica/menu/Blip2.wav") hovered [ Play ("test_one", "sfx/click.wav")]
    else:
        imagebutton auto "gui/1_%s.png" xpos 300 ypos 600 focus_mask
    if valentynacontacto:
         imagebutton auto "gui/8valentyna_%s.png" xpos 300 ypos 650 focus_mask True action ShowMenu('valentyna') activate_sound ("musica/menu/Blip2.wav") hovered [ Play ("test_one", "sfx/click.wav")]
    else:
        imagebutton auto "gui/1_%s.png" xpos 300 ypos 650 focus_mask
    
    imagebutton auto "gui/flechar_%s.png" xpos 800 ypos 900 focus_mask True action ShowMenu('personajes2') activate_sound ("musica/menu/Blip2.wav") hovered [ Play ("test_one", "sfx/click.wav")]
    
The fact is that, when changing the screen, the information is not saved on the right side and vice versa. I would like to know if there is any way to keep the information to the right when the screen on the left is changed.

Here I leave an explanatory image:

https://ibb.co/dfmuMw

User avatar
DragoonHP
Miko-Class Veteran
Posts: 709
Joined: Tue Jun 22, 2010 12:54 am
Completed: Christmas
IRC Nick: DragoonHP
Location: Zion Island, Solario
Contact:

Re: Positioning and screen

#2 Post by DragoonHP » Wed Jan 24, 2018 11:34 am

I'm not sure I completely understand what you are trying to do, but try removing tag menu from one or both the screens and see if it helps.

Post Reply

Who is online

Users browsing this forum: Alex