[solved] Prefs menu not showing up on imagemap mm

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
chungy
Regular
Posts: 26
Joined: Sun Sep 23, 2018 9:07 pm
Contact:

[solved] Prefs menu not showing up on imagemap mm

#1 Post by chungy »

Heya, my prefs arent showing up when i click the button i've made for it- but it's not the buttons i think are the issue, i think that bc/ its a game_menu that's the issue.

MM on it's own:
mm 1.PNG
'prefs' screen:
mm 2.PNG
(added red circle to show the only thing that pops up other than return)(also the gallery button is selected, but thats just bc/ my mouse was hovered over it.)

i've asked some people in the discord server and haven't gotten a straight answer. Honestly the best option at this point is to make a custom screen FOR prefs instead of having it as a game_menu, bc i'm pretty sure that's the issue :/
Last edited by chungy on Sun Sep 30, 2018 1:43 pm, edited 1 time in total.
https://gutrotz.itch.io/
Check out my itch.io!

viewtopic.php?f=62&t=52002&p=496592#p496592
Sprite commissions closed!

User avatar
kostek00
Regular
Posts: 131
Joined: Wed Mar 28, 2018 5:54 pm
Contact:

Re: Prefs menu not showing up on imagemap mm

#2 Post by kostek00 »

Can you post your code for main menu and options menu? That way someone might see what is wrong with your menu.

User avatar
chungy
Regular
Posts: 26
Joined: Sun Sep 23, 2018 9:07 pm
Contact:

Re: Prefs menu not showing up on imagemap mm

#3 Post by chungy »

kostek00 wrote: Sat Sep 29, 2018 2:51 pm Can you post your code for main menu and options menu? That way someone might see what is wrong with your menu.
yeah, here it is;
main menu

Code: Select all

## Main Menu screen ############################################################
##
## Used to display the main menu when Ren'Py starts.
##
## https://www.renpy.org/doc/html/screen_special.html#main-menu

screen main_menu():

    ## This ensures that any other menu screen is replaced.
    tag menu

    style_prefix "main_menu"

    add gui.main_menu_background

    ## This empty frame darkens the main menu.
    frame:
        pass

    ## The use statement includes another screen inside this one. The actual
    ## contents of the main menu are in the navigation screen.
    use navigation

  
style main_menu_frame is empty
style main_menu_vbox is vbox
style main_menu_text is gui_text
style main_menu_title is main_menu_text
style main_menu_version is main_menu_text

style main_menu_frame:
    xsize 420
    yfill True

    background "gui/overlay/main_menu.png"

style main_menu_vbox:
    xalign 1.0
    xoffset -30
    xmaximum 1200
    yalign 1.0
    yoffset -30

style main_menu_text:
    properties gui.text_properties("main_menu", accent=True)

style main_menu_title:
    properties gui.text_properties("title")

style main_menu_version:
    properties gui.text_properties("version")
prefs

Code: Select all

## Preferences screen ##########################################################
##
## The preferences screen allows the player to configure the game to better suit
## themselves.
##
## https://www.renpy.org/doc/html/screen_special.html#preferences

screen preferences():

    tag menu

    use game_menu(_("Options"), scroll="viewport"):

        vbox:

            hbox:
                box_wrap True

                if renpy.variant("pc"):

                    vbox:
                        style_prefix "radio"
                        label _("Display")
                        textbutton _("Window") action Preference("display", "window")
                        textbutton _("Fullscreen") action Preference("display", "fullscreen")

                vbox:
                    style_prefix "radio"
                    label _("Rollback Side")
                    textbutton _("Disable") action Preference("rollback side", "disable")
                    textbutton _("Left") action Preference("rollback side", "left")
                    textbutton _("Right") action Preference("rollback side", "right")

                vbox:
                    style_prefix "check"
                    label _("Skip")
                    textbutton _("Unseen Text") action Preference("skip", "toggle")
                    textbutton _("After Choices") action Preference("after choices", "toggle")
                    textbutton _("Transitions") action InvertSelected(Preference("transitions", "toggle"))

                ## Additional vboxes of type "radio_pref" or "check_pref" can be
                ## added here, to add additional creator-defined preferences.

            null height (4 * gui.pref_spacing)

            hbox:
                style_prefix "slider"
                box_wrap True

                vbox:

                    label _("Text Speed")

                    bar value Preference("text speed")

                    label _("Auto-Forward Time")

                    bar value Preference("auto-forward time")

                vbox:

                    if config.has_music:
                        label _("Music Volume")

                        hbox:
                            bar value Preference("music volume")

                    if config.has_sound:

                        label _("Sound Volume")

                        hbox:
                            bar value Preference("sound volume")

                            if config.sample_sound:
                                textbutton _("Test") action Play("sound", config.sample_sound)


                    if config.has_voice:
                        label _("Voice Volume")

                        hbox:
                            bar value Preference("voice volume")

                            if config.sample_voice:
                                textbutton _("Test") action Play("voice", config.sample_voice)

                    if config.has_music or config.has_sound or config.has_voice:
                        null height gui.pref_spacing

                        textbutton _("Mute All"):
                            action Preference("all mute", "toggle")
                            style "mute_all_button"


style pref_label is gui_label
style pref_label_text is gui_label_text
style pref_vbox is vbox

style radio_label is pref_label
style radio_label_text is pref_label_text
style radio_button is gui_button
style radio_button_text is gui_button_text
style radio_vbox is pref_vbox

style check_label is pref_label
style check_label_text is pref_label_text
style check_button is gui_button
style check_button_text is gui_button_text
style check_vbox is pref_vbox

style slider_label is pref_label
style slider_label_text is pref_label_text
style slider_slider is gui_slider
style slider_button is gui_button
style slider_button_text is gui_button_text
style slider_pref_vbox is pref_vbox

style mute_all_button is check_button
style mute_all_button_text is check_button_text

style pref_label:
    top_margin gui.pref_spacing
    bottom_margin 3

style pref_label_text:
    yalign 1.0

style pref_vbox:
    xsize 338

style radio_vbox:
    spacing gui.pref_button_spacing

style radio_button:
    properties gui.button_properties("radio_button")
    foreground "gui/button/check_[prefix_]foreground.png"

style radio_button_text:
    properties gui.button_text_properties("radio_button")

style check_vbox:
    spacing gui.pref_button_spacing

style check_button:
    properties gui.button_properties("check_button")
    foreground "gui/button/check_[prefix_]foreground.png"

style check_button_text:
    properties gui.button_text_properties("check_button")

style slider_slider:
    xsize 525

style slider_button:
    properties gui.button_properties("slider_button")
    yalign 0.5
    left_margin 15

style slider_button_text:
    properties gui.button_text_properties("slider_button")

style slider_vbox:
    xsize 675
and game/nav screen where i keep my imagemap;

Code: Select all

################################################################################
## Main and Game Menu Screens
################################################################################

## Navigation screen ###########################################################
##
## This screen is included in the main and game menus, and provides navigation
## to other menus, and to start the game.

screen navigation():
###First- a 'screen' (as far as I know) is for 'menus'....they have a set of commands and actions that are specific to them (that will not work with 'labels'.)  You should 
###google 'renpy screen commands' if you would like to learn more.

    
# The various buttons.
    imagemap:

#Everything needs to be indented a certain way, or you will get an error when you start your game#
        
        idle "group_idle.png"
        hover "group_hover.png"
        ground "group_ground.png"
        
#^^^Here is where you add the names of your image files.  My image files are called group_idle.png, group_hover.png, and group_ground.png....you need to replace my 
###images with your own.  make sure the name of your image goes between the parenthesis ("") and that you add the .png or .jpg after the image name.
####for this menu screen your images will need to be in the game folder labeled "images" to be found.  If you have an additional folder inside of the 
####images folder, you will need to add the name of that folder to your image for it to be found. Example; if my image were in a folder labeled "mainmenu"  I would 
#### put "mainmenu/group_idle.png" in parenthesis after the word idle above.


       
        hotspot (1036, 50, 491, 235) action ShowMenu('start')
        hotspot (1336, 226, 510, 212) action ShowMenu('preferences')
        hotspot (68, 24, 473, 277) action ShowMenu('gallery')
        hotspot (1024, 381, 374, 180) action Quit('quit')
https://gutrotz.itch.io/
Check out my itch.io!

viewtopic.php?f=62&t=52002&p=496592#p496592
Sprite commissions closed!

User avatar
kostek00
Regular
Posts: 131
Joined: Wed Mar 28, 2018 5:54 pm
Contact:

Re: Prefs menu not showing up on imagemap mm

#4 Post by kostek00 »

From what I see your menu sees preferences screen but not it's content. You should check viewport as it looks like problem lies there.

By the way is this some sort of automaticly generated menu? Because I must say it looks kinda strange.

User avatar
chungy
Regular
Posts: 26
Joined: Sun Sep 23, 2018 9:07 pm
Contact:

Re: Prefs menu not showing up on imagemap mm

#5 Post by chungy »

kostek00 wrote: Sat Sep 29, 2018 6:34 pm From what I see your menu sees preferences screen but not it's content. You should check viewport as it looks like problem lies there.

By the way is this some sort of automaticly generated menu? Because I must say it looks kinda strange.
could you explain what you think the issue is w viewport?

also yes and no, i used an image map mm tutorial for some parts !
https://gutrotz.itch.io/
Check out my itch.io!

viewtopic.php?f=62&t=52002&p=496592#p496592
Sprite commissions closed!

User avatar
Randomiser
Newbie
Posts: 7
Joined: Fri Sep 28, 2018 2:07 pm
Contact:

Re: Prefs menu not showing up on imagemap mm

#6 Post by Randomiser »

I think I see the problem. Your image map replaced the navigation screen. All game_menus use the navigation screen, so your image map is being drawn over the preferences screen. (The title and return button are drawn last, which is why "Options" is still visible.) I would suggest moving your image map onto the main_menu screen instead, and tell it not to use the default navigation screen by removing "use navigation" from main_menu. I think the way you currently have it set up would affect other menus on the pause menu as well. Since the navigation screen is not only used by the main menu but also used to access those other screens, you'll either want to keep the default one or create your own.

User avatar
chungy
Regular
Posts: 26
Joined: Sun Sep 23, 2018 9:07 pm
Contact:

Re: Prefs menu not showing up on imagemap mm

#7 Post by chungy »

Randomiser wrote: Sun Sep 30, 2018 2:47 am I think I see the problem. Your image map replaced the navigation screen. All game_menus use the navigation screen, so your image map is being drawn over the preferences screen. (The title and return button are drawn last, which is why "Options" is still visible.) I would suggest moving your image map onto the main_menu screen instead, and tell it not to use the default navigation screen by removing "use navigation" from main_menu. I think the way you currently have it set up would affect other menus on the pause menu as well. Since the navigation screen is not only used by the main menu but also used to access those other screens, you'll either want to keep the default one or create your own.
oh wow it worked! tysm that's been bugging me for days! I deleted the use_nav from both the game menu and main menu and it worked, ty!
https://gutrotz.itch.io/
Check out my itch.io!

viewtopic.php?f=62&t=52002&p=496592#p496592
Sprite commissions closed!

Post Reply

Who is online

Users browsing this forum: No registered users