Add FilePageLast action for the save menu
This commit is contained in:
parent
ad017851e6
commit
85b8c10ad7
@ -333,6 +333,8 @@ screen navigation():
|
||||
null height 35
|
||||
textbutton "Next" action FilePageNext() at navigation_tabs
|
||||
textbutton "Previous" action FilePagePrevious() at navigation_tabs
|
||||
null height 35
|
||||
textbutton "Last Page" action FilePageLast() at navigation_tabs
|
||||
|
||||
use file_slots(_("Save"))
|
||||
elif category == "load":
|
||||
@ -344,6 +346,8 @@ screen navigation():
|
||||
null height 35
|
||||
textbutton "Next" action FilePageNext() at navigation_tabs
|
||||
textbutton "Previous" action FilePagePrevious() at navigation_tabs
|
||||
null height 35
|
||||
textbutton "Last Page" action FilePageLast() at navigation_tabs
|
||||
|
||||
use file_slots(_("Load"))
|
||||
elif category == "settings":
|
||||
|
@ -1,4 +1,19 @@
|
||||
init python:
|
||||
class FilePageLast(Action):
|
||||
def __call__(self):
|
||||
if not self.get_sensitive():
|
||||
return
|
||||
|
||||
saves = renpy.list_saved_games(r"\d+")
|
||||
|
||||
if not saves:
|
||||
return 1
|
||||
|
||||
last_page = int(saves[-1][0][0])
|
||||
|
||||
persistent._file_page = last_page
|
||||
renpy.restart_interaction()
|
||||
|
||||
class SetShopCategory(Action):
|
||||
def __init__(self, category: str, items: list):
|
||||
self.category = category
|
||||
|
Loading…
Reference in New Issue
Block a user