Code: Select all
init python:
class Continue(Action):
"""
:doc: menu_action
Causes the last save to be loaded.
The purpose of this is to load the player's last save
from the main menu.
`regexp`
If present, will be used in `renpy.newest_slot`.
"""
def __init__(self, regexp=r"(?!_reload).+", confirm=False):
self.regexp = regexp
def __call__(self):
recent_save = renpy.newest_slot(self.regexp)
if recent_save:
renpy.load(recent_save)
def get_sensitive(self):
if _in_replay:
return False
return renpy.newest_slot(self.regexp) is not None
screen navigation():
textbutton "Continue" action Continue()