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
|
null height 35
|
||||||
textbutton "Next" action FilePageNext() at navigation_tabs
|
textbutton "Next" action FilePageNext() at navigation_tabs
|
||||||
textbutton "Previous" action FilePagePrevious() 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"))
|
use file_slots(_("Save"))
|
||||||
elif category == "load":
|
elif category == "load":
|
||||||
@ -344,6 +346,8 @@ screen navigation():
|
|||||||
null height 35
|
null height 35
|
||||||
textbutton "Next" action FilePageNext() at navigation_tabs
|
textbutton "Next" action FilePageNext() at navigation_tabs
|
||||||
textbutton "Previous" action FilePagePrevious() 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"))
|
use file_slots(_("Load"))
|
||||||
elif category == "settings":
|
elif category == "settings":
|
||||||
|
@ -1,4 +1,19 @@
|
|||||||
init python:
|
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):
|
class SetShopCategory(Action):
|
||||||
def __init__(self, category: str, items: list):
|
def __init__(self, category: str, items: list):
|
||||||
self.category = category
|
self.category = category
|
||||||
|
Loading…
Reference in New Issue
Block a user