screen file_slots(title):
default page_name_value = FilePageNameInputValue(pattern=_("Página {}"), auto=_("Grabación automática"), quick=_("Grabación rápida"))
use game_menu(title):
fixed:
## This ensures the input will get the enter event before any of the
## buttons do.
order_reverse False
## El nombre de la pagina, se puede editar haciendo clic en el
## botón.
#text "{size=24}Add a name to your save file here (optional):{/size}" xalign 0.5
button:
style "page_label"
key_events True
xalign 0.5
action page_name_value.Toggle()
input:
style "page_label_text"
value page_name_value
if title in [ "Save", "Guardar", "Guardado" ]:
hbox:
text "Name : "
button:
style "page_label"
key_events True
xalign 0.5
action NullAction()
input:
value VariableInputValue('save_name')
## The grid of file slots.
grid gui.file_slot_cols gui.file_slot_rows:
style_prefix "slot"
xalign 0.5
yalign 0.5
spacing gui.slot_spacing
for i in range(gui.file_slot_cols * gui.file_slot_rows):
$ slot = i + 1
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=_("vacío")):
style "slot_time_text"
text FileSaveName(slot):
style "slot_name_text"
key "save_delete" action FileDelete(slot)
## Buttons to access other pages.
hbox:
style_prefix "page"
xalign 0.5
yalign 1.0
spacing gui.page_spacing
textbutton _("<") action FilePagePrevious()
if config.has_autosave:
textbutton _("{#auto_page}A") action FilePage("auto")
if config.has_quicksave:
textbutton _("{#quick_page}R") action FilePage("quick")
## range(1, 10) da los numeros del 1 al 9.
for page in range(1, 10):
textbutton "[page]" action FilePage(page)
textbutton _(">") action FilePageNext()