Example:


Thank you both so much for all the information! Unfortunately I'm not doing any progress on thisCrazy Li wrote:In Ren'py, "quick menu" normally refers to the options that are on the text box in-game that you can click any time dialog is being displayed. This sounds more like you want something akin to the navigational menu to appear. What you could do is in screens.rpy, copy your Navigation menu as a basis, but rename it to something else and fiddle with the options and position of it to suit your needs. Then the button itself would have: action ShowMenu("yourmenu")
You can also use a hide on the button as well as Kinsman said. Of course, also as said, the button probably needs to be its own screen if hidden. The other alternative is to make the menu literally cover the button when called so that you just can't see it for that reason.
A third option, if you don't mind the menu/button being hidden when other menus are called is to tag them both as menu so the button automatically goes away when this (or any other) menu is called.
Code: Select all
##############################################################################
# Quick Menu
screen options:
# The background of the game menu.
window:
style "gm_root"
# The various buttons.
vbox:
xpos 550
ypos 150
spacing 0
imagebutton auto "ui/load_%s.png" action ShowMenu("options")
#
# A screen that's included by the default say screen, and adds quick access to
# several useful functions.
screen quick_menu:
# Add an in-game quick menu.
hbox:
style_group "quick_menu"
background None
xpadding 0
ypadding 0
imagemap:
ground "ui/optionsground.png"
idle "ui/optionsground.png"
hover "ui/optionsidle.png"
selected_idle "ui/optionshover.png"
#hotspot (737, 5, 63, 62)
hotspot (654, 103, 107, 40) action ShowMenu('save')
hotspot (654, 144, 107, 40) action [ShowMenu("load")]
hotspot (654, 191, 107, 40) action Skip()
hotspot (654, 239, 107, 40) action Preference("auto-forward", "toggle")
hotspot (654, 281, 107, 40) action ShowMenu('preferences')
#hotspot (654, 126, 107, 40) action
init -2 python:
style.file_picker_frame = Style(style.menu_frame)
style.file_picker_nav_button = Style(style.small_button)
style.file_picker_nav_button_text = Style(style.small_button_text)
style.file_picker_button = Style(style.large_button)
style.file_picker_text = Style(style.large_button_text)
config.thumbnail_width = 350
config.thumbnail_height = 250
style.gm_nav_button.size_group = "gm_nav"
# Set a default value for the auto-forward time, and note that AFM is
# turned off by default.
config.default_afm_time = 10
config.default_afm_enable = FalseCode: Select all
action ShowMenu("quick_menu")Well the problems are basically that options isn't clickable and that quick menu is showing. I don't know what to do with this code or how to turn things around...Crazy Li wrote:I can look at your code, but it would help if you actually told us what the problem was so I can know what to look for.
Is it just not showing when you click the button?
Just making wild guesses, here are some problems I see:
1. Your quick menu isn't tagged as a menu. If you don't want it to function as one, that's fine. Just letting you know.
2. The quick menu by default is supposed to show on the say window. If you're re-purposing it, you may want to make sure your Say window doesn't use quick_menu or that will make it always show when there's dialog.
3. Your options screen is showing itself. There's no way "quick_menu" will ever show with that code. Tryassuming that is the screen you want to pop up on click.Code: Select all
action ShowMenu("quick_menu")
Code: Select all
# The background of the game menu.
window:To tag a screen as a menu, add:muniiam wrote:Well the problems are basically that options isn't clickable and that quick menu is showing. I don't know what to do with this code or how to turn things around...Crazy Li wrote:I can look at your code, but it would help if you actually told us what the problem was so I can know what to look for.
Is it just not showing when you click the button?
Just making wild guesses, here are some problems I see:
1. Your quick menu isn't tagged as a menu. If you don't want it to function as one, that's fine. Just letting you know.
2. The quick menu by default is supposed to show on the say window. If you're re-purposing it, you may want to make sure your Say window doesn't use quick_menu or that will make it always show when there's dialog.
3. Your options screen is showing itself. There's no way "quick_menu" will ever show with that code. Tryassuming that is the screen you want to pop up on click.Code: Select all
action ShowMenu("quick_menu")
1. How do I tag it as menu? I'm so sorry for all my questions, it's just that I'm new to this but I'm doing my best to learn everything I have to know.
2. This must be the say window right:What exactly am I supposed to write there? When I look it up online I only find style "gm_root"Code: Select all
# The background of the game menu. window:
3. Yes, I changed it to quick_menu. Thank you. But right now the quick menu is still visible. Do I have to change the imagemaps around or are they correct?
Thank you so much for everything!
Code: Select all
tag menuCode: Select all
##############################################################################
# Say
#
# Screen that's used to display adv-mode dialogue.
# http://www.renpy.org/doc/html/screen_special.html#say
screen say:
# Defaults for side_image and two_window
default side_image = None
default two_window = True
# Decide if we want to use the one-window or two-window varaint.
if not two_window:
# The one window variant.
window:
id "window"
has vbox:
style "say_vbox"
if who:
text who id "who"
text what id "what"
else:
# The two window variant.
vbox:
style "say_two_window_vbox"
if who:
window:
style "say_who_window"
text who:
id "who"
window:
id "window"
has vbox:
style "say_vbox"
text what id "what"
# If there's a side image, display it above the text.
if side_image:
add side_image
else:
add SideImage() xalign 0.0 yalign 1.0
# Use the quick menu.
use quick_menuCode: Select all
use optionsCrazy Li wrote:You never said the button itself wasn't showing. You need to code it to display on the screen in some fashion. There are a number of ways you can do this, but one of the easier ways might be to add
to the end of that Say window code I mentioned last post and that should tell the game to at least have it show any time there's dialog. If you need it to show in other cases as well, you're going to need a different (or just additional ways) to force it to display.Code: Select all
use options
Things don't magically just show up on their own, though. You need to tell the game what to do in order for it to actually do it.
EDIT: and if it still doesn't show up after doing what I said, you should double-check to make sure wherever you're positioning it is actually a spot that's on screen. xpos and ypos don't use pixels. They range from 0 to 1 with 0 being the left/top of the screen and 1 being the bottom/right. It might be best to use something like xpos 1, ypos 0 to start with and adjust from there.
I don't want to sound mean, but it's only not working because you're not doing it right. This could probably be fixed sooner if I just entirely re-wrote your code for you and gave that to you (which is probably what most people do to answer questions), but my style is usually just to tell people how stuff works as a teaching method so they can learn how and why rather than just copying and pasting without any real understanding of what the fix was.
If you want me to just throw working code at you instead, let me know.
Users browsing this forum: Google [Bot]