Problem with the caption in the choices

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
LittleRainySeasons
Regular
Posts: 44
Joined: Fri Mar 24, 2017 9:37 am
Projects: Patsy n' Crinkles, Galaxy Party, Time|Reversed
Deviantart: LittleRainySeasons
Soundcloud: RoboticDreamz
itch: LittleRainySeasons
Contact:

Problem with the caption in the choices

#1 Post by LittleRainySeasons »

So, in my game, there will come to a point where the GUI completely changes when they buy an item to give a feel of playing a different game within the game.

Unfortunately, there's a problem:
When I set config.narrator.menu as true, this happens. The new GUI (right) doesn't display properly at all
Image Image

When set to False, the default GUI mess up while the new one displays properly like it should be.
ImageImage

Here's the code btw:

Code: Select all

screen choice(items):
    if lynnnbetsymode:
        window:
            style "lynnbetsy_window"

            vbox:
                style "menu"
                yanchor -12
                spacing 5
                            
                for caption, action, chosen in items:

                    if action:
                        button:
                            background None
                            insensitive_background None
                            hover_background None
                                                    
                            action action
                            text caption style "lynnbetsy_choice"

                    else:
                            text caption style "lynnbetsy_caption"
    else:
        window:
            style "menu_window"
            xalign 0
            yalign 1.09


            vbox:
                style "menu"
                spacing 3

                for caption, action, chosen in items:

                    if action:
                        button:
                            background None
                            insensitive_background None
                            hover_background None
                                    
                            action action
                            text caption style "menu_choice"

                    else:
                        text caption style "menu_caption"

init -2:
    $ config.narrator_menu = True
    style menu_choice is button_text:
        size 15
        xalign 0.0 yanchor 15
        font "gui/PressStart2P-Regular.ttf"
        color "#ffffff"
        hover_color "#f8b800"
        
    style menu_caption:
        size 17
        xanchor 0 yanchor 0.12
        font "gui/RosesareFF0000.ttf"
        color "#ffffff"
        
    style lynnbetsy_choice is button_text:
        size 17
        xanchor 0.51 yanchor 0
        font "gui/RosesareFF0000.ttf"
        color "#ffffff"
        hover_color "#f8b800"
        
    style lynnbetsy_caption:
        size 17
        xanchor -0.042 yanchor -2
        font "gui/RosesareFF0000.ttf"
        color "#ffffff"

    style lynnbetsy_window:
        background "hidden/warez/lynn-betsy/gui/choicewindow.png"
        xanchor 0.522 yanchor 1.325
        
    style menu_window:
        background "gui/txtbox.png"

Is there any way to fix this? I tried putting the option in the main label where the alternate game starts and it doesn't work either.

Edit: I stopped messing with the narrator menu after I was told it cannot be modified in any way but I still have a problem with the caption as it's not showing up on top of the asset.

It suppose to look like when it was turned off, but if I did turn it off, the default GUI messes up.
Last edited by LittleRainySeasons on Thu Feb 01, 2024 8:36 pm, edited 1 time in total.

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Problem with config.narrator.menu

#2 Post by PyTom »

You aren't allowed to change config variables while the game is running.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
LittleRainySeasons
Regular
Posts: 44
Joined: Fri Mar 24, 2017 9:37 am
Projects: Patsy n' Crinkles, Galaxy Party, Time|Reversed
Deviantart: LittleRainySeasons
Soundcloud: RoboticDreamz
itch: LittleRainySeasons
Contact:

Re: Problem with config.narrator.menu

#3 Post by LittleRainySeasons »

I still cannot figure out the problem and I stopped fiddling with the narrator menu. The caption of the blue GUI just doesn't show up and it remains underneath the asset.

If I turned it off, it would show up correctly but then the default GUI messes up.

Besides the caption is the main problem here

I just want the GUI to look exactly like this without modifying the narrator menu:

Image

Post Reply

Who is online

Users browsing this forum: Alex