[Solved] Sliding Menu in Save Data Screenshot
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.
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.
- Shocking Alberto
- Regular
- Posts: 35
- Joined: Sun Mar 29, 2020 4:58 am
- Contact:
[Solved] Sliding Menu in Save Data Screenshot
I have a menu which slides in from the right hand side of the menu on mouseover and of course hidden when not in the defined mousearea. The issue that occurs is that if you save using the menu, the screenshot will also show the menu in it. I figured an easy solution would be to add a Hide action to the save button and you can clearly see the menu and it properly gets hidden after clicking but it still appears in the save screenshot.
I'm not entirely sure what would be the proper thing to do to make sure the menu doesn't appear. Maybe there's a way to delay as to when the screenshot is taken? I know FileScreenshot is used to add the screenshot to the save data slot but beyond that I'm a bit stumped. If there is a thread already on this and I missed it, just point me in that direction and I'll be on my way. /o/
I'm not entirely sure what would be the proper thing to do to make sure the menu doesn't appear. Maybe there's a way to delay as to when the screenshot is taken? I know FileScreenshot is used to add the screenshot to the save data slot but beyond that I'm a bit stumped. If there is a thread already on this and I missed it, just point me in that direction and I'll be on my way. /o/
Last edited by Shocking Alberto on Tue Jun 22, 2021 4:32 pm, edited 2 times in total.
Re: Sliding Menu in Save Data Screenshot
As documented, save screen screenshots take "a picture of the screen before a file save screen is shown," so as long as you hide the menu screen before you enter the save screen you should be fine. Since it sounds like you enter the save screen through the menu screen, I wonder if using ShowMenu("yourmenuscreen") rather than Show("yourmenuscreen") when you hover over it works.
- Shocking Alberto
- Regular
- Posts: 35
- Joined: Sun Mar 29, 2020 4:58 am
- Contact:
Re: Sliding Menu in Save Data Screenshot
For clarification, this is what the menu code in screens looks like:
I figured adding the Hide("game_menu") in the action line would have been sufficient but apparently it was not. Incidentally, the only way to avoid this problem is to access the save menu via the right click since you don't need to open up the menu to do so. I wasn't sure what you meant by using ShowMenu instead of Show but if you have any other insight, it is certainly appreciated!
Code: Select all
screen game_menu():
style_prefix "game_menu"
frame at game_menu_inout:
vbox:
null width 160 height 30
# Qsave
imagebutton:
idle "gui/qmenu_btn_qsave_off.png"
hover "gui/qmenu_btn_qsave_over.png"
hover_sound "sse_02"
action [Play("sound", "sse_01"), QuickSave()]
# Qload
imagebutton:
idle "gui/qmenu_btn_qload_off.png"
hover "gui/qmenu_btn_qload_over.png"
hover_sound "sse_02"
action [Play("sound", "sse_01"), QuickLoad()]
# Save
imagebutton:
idle "gui/qmenu_btn_save_off.png"
hover "gui/qmenu_btn_save_over.png"
hover_sound "sse_02"
action [Hide("game_menu"), Play("sound", "sse_01"), ShowMenu("save")]
# Load
imagebutton:
idle "gui/qmenu_btn_load_off.png"
hover "gui/qmenu_btn_load_over.png"
hover_sound "sse_02"
action [Play("sound", "sse_01"), ShowMenu("load")]
# Config
imagebutton:
idle "gui/qmenu_btn_config_off.png"
hover "gui/qmenu_btn_config_over.png"
hover_sound "sse_02"
action [Play("sound", "sse_01"), ShowMenu("preferences")]
Re: Sliding Menu in Save Data Screenshot
I thought you had another screen that showed the game_menu so I suggested replacing the action Show("game_menu") with ShowMenu("game_menu"), but it looks like you don't have another screen, so maybe try:
Code: Select all
screen game_menu():
tag menu
- Shocking Alberto
- Regular
- Posts: 35
- Joined: Sun Mar 29, 2020 4:58 am
- Contact:
Re: Sliding Menu in Save Data Screenshot
Unfortunately, the result is still the same. I wonder if a workaround is to go to another screen of some sort to take the screenshot then going to the save menu. I did mess with that idea by putting a renpy.take_screenshot() line in the save screen which of course changes the screenshot to the save screen. I am definitely overthinking this somehow I'm sure.
Did some more digging and it looks like someone came up with a solution to a similar problem:
[Solved] Unfocusing screenshot button after click
I'm not 100% sure how to make this work in my case though unfortunately but it is a direction of sorts.
Did some more digging and it looks like someone came up with a solution to a similar problem:
[Solved] Unfocusing screenshot button after click
I'm not 100% sure how to make this work in my case though unfortunately but it is a direction of sorts.
Re: Sliding Menu in Save Data Screenshot
Not familiar with the queue event, but an easy way is to probably show an empty screen after hiding the game_menu and before showing the save menu.
If even this doesn't work, I would ask in the Discord server.
If even this doesn't work, I would ask in the Discord server.
- Shocking Alberto
- Regular
- Posts: 35
- Joined: Sun Mar 29, 2020 4:58 am
- Contact:
Re: Sliding Menu in Save Data Screenshot
After some discussion, a solution has been found!
What is required is to comment out a couple lines in 00gamemenu.rpy:
After that, just add FileTakeScreenshot() to the screen that handles the sliding in/out function and everything works as it should. Only thing is I have to remember to uncomment this for any other game being worked on. Hope this may help someone out there.
What is required is to comment out a couple lines in 00gamemenu.rpy:
Code: Select all
renpy.movie_stop(only_fullscreen=True)
#if not renpy.context()._menu:
# renpy.take_screenshot((config.thumbnail_width, config.thumbnail_height))
Who is online
Users browsing this forum: Google [Bot], Majestic-12 [Bot]