Save screen exiting through X on the window
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.
-
- Miko-Class Veteran
- Posts: 745
- Joined: Fri Nov 02, 2012 8:41 am
- Projects: Red eyes in the darkness
- Contact:
Save screen exiting through X on the window
I've got a save screen which does not take up the whole screen itself. When I use right click to leave it the story continues normally. But if I use the X on the screen I need to click with the right mouse key still to come back to the story.
Anyone got an idea how to correct this?
Anyone got an idea how to correct this?
-
- Regular
- Posts: 26
- Joined: Sun Feb 22, 2015 7:46 pm
- Contact:
Re: Save screen exiting through X on the window
That depend on the code you used for that X button.
-
- Miko-Class Veteran
- Posts: 745
- Joined: Fri Nov 02, 2012 8:41 am
- Projects: Red eyes in the darkness
- Contact:
Re: Save screen exiting through X on the window
Took me a while to get it what you meant (overread the imagebutton the whole time)CupCakeComedy wrote:That depend on the code you used for that X button.
In the options.rpythe modified save screen:
Code: Select all
screen save:
modal True
window id "save" at slidein:
style "smallwindow"
add "Assets/UserInterface/labels/save.png" xalign 0.5 yalign 0.335
imagebutton auto "Assets/UserInterface/close_%s.png" action [Hide("save"), Play("sound", "Assets/SoundEffects/close.ogg")] hovered Play("sound", "Assets/SoundEffects/select.ogg") style "smallwindowclose"
use file_picker
-
- Miko-Class Veteran
- Posts: 745
- Joined: Fri Nov 02, 2012 8:41 am
- Projects: Red eyes in the darkness
- Contact:
Re: Save screen exiting through X on the window
I tested around a bit and saw that:
Solves the rightclick problem BUT the slideout which hide does disappears.
Then I used the original code and added: on "hide" action Return() this did exactly....nothing aka no difference to the starting case
Code: Select all
screen save:
modal True
window id "save" at slidein:
style "smallwindow"
add "Assets/UserInterface/labels/save.png" xalign 0.5 yalign 0.335
imagebutton auto "Assets/UserInterface/close_%s.png" action [Return(), Play("sound", "Assets/SoundEffects/close.ogg")] hovered Play("sound", "Assets/SoundEffects/select.ogg") style "smallwindowclose"
use file_picker
Then I used the original code and added: on "hide" action Return() this did exactly....nothing aka no difference to the starting case
-
- Miko-Class Veteran
- Posts: 745
- Joined: Fri Nov 02, 2012 8:41 am
- Projects: Red eyes in the darkness
- Contact:
Re: Save screen exiting through X on the window
To sum things up:
The save screen is sliding in and needs to slide out again so taht things look good. MY main problem here right now is that if I use Return() as action on the imagebutton it does not slideout but I get back to game. When I instead hide the save screen it slides out nicely BUT I need to rightclick to get back to game.
Is there any solution for this?
The save screen is sliding in and needs to slide out again so taht things look good. MY main problem here right now is that if I use Return() as action on the imagebutton it does not slideout but I get back to game. When I instead hide the save screen it slides out nicely BUT I need to rightclick to get back to game.
Is there any solution for this?
- Marionette
- Regular
- Posts: 128
- Joined: Thu Apr 21, 2011 12:04 pm
- Completed: https://marionette.itch.io/
- Projects: Get Meowt of Here
- Deviantart: rexx9224
- itch: marionette
- Location: Ireland
- Discord: Marionette#2995
- Contact:
Re: Save screen exiting through X on the window
Is it possible to have Hide() and then return() within the same action block?
Something like:
I'm not sure if this is even possible, but i might be worth trying if you haven't already.
Other than that maybe you can have it make a call to another label/screen/function that performs both actions.
Something like:
Code: Select all
imagebutton auto "Assets/UserInterface/close_%s.png" action [Hide("save"), Return(), Play("sound", "Assets/SoundEffects/close.ogg")]
Other than that maybe you can have it make a call to another label/screen/function that performs both actions.
-
- Miko-Class Veteran
- Posts: 745
- Joined: Fri Nov 02, 2012 8:41 am
- Projects: Red eyes in the darkness
- Contact:
Re: Save screen exiting through X on the window
Sadly doesn't work. was one of my first tests. It works in a way though BUT the Return() triggers so fasrt that there is no fadeout animation the screen just disappears and the game continues (I want to still be able to have the fadeout where possible)Marionette wrote:Is it possible to have Hide() and then return() within the same action block?
Something like:
I'm not sure if this is even possible, but i might be worth trying if you haven't already.Code: Select all
imagebutton auto "Assets/UserInterface/close_%s.png" action [Hide("save"), Return(), Play("sound", "Assets/SoundEffects/close.ogg")]
Other than that maybe you can have it make a call to another label/screen/function that performs both actions.
-
- Lemma-Class Veteran
- Posts: 2299
- Joined: Mon Feb 06, 2012 9:50 pm
- Completed: Icebound, Selenon Rising Ep. 1-2
- Projects: Selenon Rising Ep. 3-4
- Organization: Fastermind Games
- Deviantart: sundownkid
- Location: NYC
- Contact:
Re: Save screen exiting through X on the window
Hide is indeed the correct command. I don't see why the X button on the save screen should also exit the base menu, that's kind of bad usability. The whole idea behind getting rid of the save screen is to allow the player to press other options on the base menu instead of simply returning to the game.
-
- Miko-Class Veteran
- Posts: 745
- Joined: Fri Nov 02, 2012 8:41 am
- Projects: Red eyes in the darkness
- Contact:
Re: Save screen exiting through X on the window
Hmmmmm although in that case there is no menu popping up. Just the disappearinh screen and nothing else
Who is online
Users browsing this forum: Bing [Bot]