save/load slot customize question[SOLVED]

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
Scribbles
Miko-Class Veteran
Posts: 636
Joined: Wed Sep 21, 2016 4:15 pm
Completed: Pinewood Island, As We Know It
Projects: In Blood
Organization: Jaime Scribbles Games
Deviantart: breakfastdoodles
itch: scribbles
Location: Ohio
Contact:

save/load slot customize question[SOLVED]

#1 Post by Scribbles »

Is there a way to add a layer onto the hovered slow buttons for Save/Load/Delete?

I'd like a opaque text "Save" "Load" show up when the player hovers over a slot, not sure how to do that since both save/load use the same "slots" screen

this is sorta what I'd like it to look like: (and then "Load" if the player was trying to load)
Image

I imagine this is the code I need to adjust, I'm just not sure how to do it in a way that it'll adjust based on if the user is trying to save or load?
Image

(i'd also like to add a little "X" button in the top corner and then adjust it so the player knows they are about to delete a save - not fully sure how I'm going to do that bit yet but any tips would be appreciated :) ! )
Last edited by Scribbles on Thu Dec 07, 2017 12:06 pm, edited 1 time in total.
Image - Image -Image

philat
Eileen-Class Veteran
Posts: 1900
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: save/load slot customize question

#2 Post by philat »

You can check which screen is showing using renpy.get_screen (https://www.renpy.org/doc/html/screen_p ... get_screen ) and use if/else statements to show screen-specific elements.

User avatar
Scribbles
Miko-Class Veteran
Posts: 636
Joined: Wed Sep 21, 2016 4:15 pm
Completed: Pinewood Island, As We Know It
Projects: In Blood
Organization: Jaime Scribbles Games
Deviantart: breakfastdoodles
itch: scribbles
Location: Ohio
Contact:

Re: save/load slot customize question

#3 Post by Scribbles »

philat wrote: Thu Dec 07, 2017 10:02 am You can check which screen is showing using renpy.get_screen (https://www.renpy.org/doc/html/screen_p ... get_screen ) and use if/else statements to show screen-specific elements.
but how to I apply the text when the button is hovered though? Thanks for that link though I can try to figure something else out if all else fails
Image - Image -Image

User avatar
Scribbles
Miko-Class Veteran
Posts: 636
Joined: Wed Sep 21, 2016 4:15 pm
Completed: Pinewood Island, As We Know It
Projects: In Blood
Organization: Jaime Scribbles Games
Deviantart: breakfastdoodles
itch: scribbles
Location: Ohio
Contact:

Re: save/load slot customize question

#4 Post by Scribbles »

I figured out I could add the "hovered option to the button to do... something when the button was hovered over, but I can't find a good action that just shows an image :-/

Code: Select all

                    button:
                        action FileAction(slot)
                        
                        hovered #show image??? 

                        has vbox

                        add FileScreenshot(slot) xalign 0.5

                        text FileTime(slot, format=_("{#file_time}%A, %B %d %Y, %H:%M"), empty=_("empty slot")):
                            style "slot_time_text"

                        text FileSaveName(slot):
                            style "slot_name_text"
                            

                        key "save_delete" action FileDelete(slot)

Image - Image -Image

User avatar
Scribbles
Miko-Class Veteran
Posts: 636
Joined: Wed Sep 21, 2016 4:15 pm
Completed: Pinewood Island, As We Know It
Projects: In Blood
Organization: Jaime Scribbles Games
Deviantart: breakfastdoodles
itch: scribbles
Location: Ohio
Contact:

Re: save/load slot customize question

#5 Post by Scribbles »

I ended up just changing "Page #" to be "Save" or "load" so I'll go ahead and mark this as solved > <
Image - Image -Image

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Kocker