Create your AI Cum Slut -70% for Mother's Day
x

Ren'Py Delete save button?

Rycharde's Realm

Well-Known Member
Game Developer
Jan 17, 2018
1,159
789
This has been asked several times, and I have looked for it, but I am trying to learn how to place a "delete save button" on the save/load images.

Example:
Delete save button.png

Thx.
 

guest1492

Member
Apr 28, 2018
363
303
DISCLAIMER: I'm not good at Ren'Py.

This is an excerpt of the code used for the save screen in a Ren'Py game on my PC:
Python:
button:
    action FileAction(slot)

    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)
As you can see, the screen shot and file name are all part of a button. I'm not sure about what behavior would result from adding a button inside of another button and then clicking on it. Maybe it'd be better to add a right-click action for deleting the save:
Python:
button:
    action FileAction(slot)
    if FileLoadable(slot):
        alternate FileDelete(slot)
Otherwise, I suppose you can try to overlay another screen (so that you can specify zorder) over the actual save screen (eg by making it a child screen) and adding buttons to that screen instead.
 
  • Like
Reactions: Rycharde's Realm

Rycharde's Realm

Well-Known Member
Game Developer
Jan 17, 2018
1,159
789
DISCLAIMER: I'm not good at Ren'Py.

This is an excerpt of the code used for the save screen in a Ren'Py game on my PC:

As you can see, the screen shot and file name are all part of a button. I'm not sure about what behavior would result from adding a button inside of another button and then clicking on it. Maybe it'd be better to add a right-click action for deleting the save:

Otherwise, I suppose you can try to overlay another screen (so that you can specify zorder) over the actual save screen (eg by making it a child screen) and adding buttons to that screen instead.
Thx. :cool: