Quick Menu not working as it shoud be when replaying a chapter

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
Ceilyan
Newbie
Posts: 13
Joined: Fri Jan 04, 2019 9:46 am

Quick Menu not working as it shoud be when replaying a chapter

#1 Post by Ceilyan »

Hello :)

So my problem is quite simple, but really annoying. I've been trying to solve it for hours (days even), with no luck so far. I tried to find an answer on the forum, but didn't find any :(

I created a section when players can replay the chapters after completing them. But when clicking on said chapters, the quick menu stops working properly. Some parts of it are unclickable (Skip and Back, and also the icon for going back to the main menu). Other buttons work fine (gallery, quit, load and save). Funnily enough, when I change the screen destination (like, instead of using action MainMenu(), I use action ShowMenu('random_screen')), it works again. Skip, Back and MainMenu seem to be the only buttons not working.

Second problem, the quick menu gets behind the text box on replay (normally, the quick menu is on the top right corner of the textbox). I use imagebuttons, but tried with imagemap: still not working T.T

Here the code of my quick menu:

Code: Select all

screen quick_menu:

    ## Ensure this appears on top of other screens.
    zorder 100

    if quick_menu:

        hbox:

            xpos 650
            ypos 550
            spacing 2

            imagebutton auto "gui/quick_menu_home_%s.png" action MainMenu() focus_mask True
            if renpy.music.is_playing(channel='music'):
                imagebutton auto "gui/music_on_%s.png" action Stop("music") focus_mask True
            else:
                imagebutton auto "gui/music_off_%s.png" action Play("music", "sfx/whybaby.mp3") focus_mask True
            imagebutton auto "gui/galery_%s.png" action ShowMenu("galerie_principale1") focus_mask True
            imagebutton auto "gui/quick_menu_save_%s.png" action ShowMenu('save1') focus_mask True
            imagebutton auto "gui/quick_menu_load_%s.png" action ShowMenu('load') focus_mask True
            imagebutton auto "gui/quick_menu_back_%s.png" action Rollback() alternate Skip(fast=True, confirm=True) hovered focus_mask True
            imagebutton auto "gui/quik_menu_skip_%s.png" action Skip() alternate Skip(fast=True, confirm=True) focus_mask True
            imagebutton auto "gui/quick_menu_quit_%s.png" action Quit() hovered Play ("test_one", "sfx/click.wav") focus_mask True

Here's also my code from my chapters select screen (I don't know if it'll be useful, but just in case):

Code: Select all

screen chapters_select1:

    # Ensure this replaces the main menu.
    tag menu

    # The background.
    add "gui/chapitreselect.jpg"

    if persistent.ch1 is True:
        imagebutton auto "chapitre1_%s.jpg" action Jump('ch1002') hovered Play ("test_one", "sfx/click.wav") xpos 200 ypos 280 focus_mask True
    else:
        imagebutton auto "gui/bouton_illu_chapitre1_2_%s.png" action NullAction() xpos 200 ypos 280 focus_mask True

    if persistent.ch2 is True:
        imagebutton auto "chapitre2_%s.jpg" action Jump('ch2002') hovered Play ("test_one", "sfx/click.wav") xpos 540 ypos 280 focus_mask None
    else:
        imagebutton auto "gui/bouton_illu_chapitre2_2_%s.png" action NullAction() hovered Play ("test_one", "sfx/click.wav") xpos 540 ypos 280 focus_mask True

    if persistent.ch3 is True:
        imagebutton auto "chapitre3_%s.jpg" action Jump('ch3002') hovered Play ("test_one", "sfx/click.wav") xpos 200 ypos 470 focus_mask True
    else:
        imagebutton auto "gui/bouton_illu_chapitre3_2_%s.png" action NullAction() hovered Play ("test_one", "sfx/click.wav") xpos 200 ypos 470 focus_mask True

    if persistent.ch4 is True:
        imagebutton auto "chapitre4_%s.jpg" action Jump('ch4002') hovered Play ("test_one", "sfx/click.wav") xpos 540 ypos 470 focus_mask True
    else:
        imagebutton auto "gui/bouton_illu_chapitre4_2_%s.png" action NullAction() hovered Play ("test_one", "sfx/click.wav") xpos 540 ypos 470 focus_mask True


    imagebutton auto "gui/forward_%s.png" action ShowMenu('chapters_select3') hovered Play ("test_one", "sfx/click.wav") xpos 726 ypos 642
    imagebutton auto "gui/accuei1_%s.png" xpos 455 ypos 650 focus_mask True hovered Play ("test_one", "sfx/click.wav") action ShowMenu('main_menu')
I'm really new to coding, so it's probably some kind of mistake on my part, but I can't figure out which one and it drives me crazy ;;

Thank you in advance for your help!

Post Reply

Who is online

Users browsing this forum: haitai, Majestic-12 [Bot]