Load works fine. I can load up a file, delete a file.
It's the save menu that is the one screwing up. I can SAVE, but I cannot overwrite nor delete file slots. If I try, then the background image goes blank (not the save/load images) and I can't exit the game, either manually or by pressing ESC to return.
My code is here:
Code: Select all
screen save():
tag menu
zorder 100
add "gui/coverup.png"
imagemap:
ground "gui/save-inactive.png"
hover "gui/save-active.png"
selected_idle "gui/save-active.png"
alpha True
hotspot (567, 68, 506, 173) clicked FileSave(1):
use load_save_slot(number=1)
hotspot (567, 295, 506, 173) clicked FileSave(2):
use load_save_slot(number=2)
hotspot (567, 522, 506, 173) clicked FileSave(3):
use load_save_slot(number=3)
hotspot (567, 749, 506, 173) clicked FileSave(4):
use load_save_slot(number=4)
hotspot (1242, 70, 506, 173) clicked FileSave(5):
use load_save_slot(number=5)
hotspot (1242, 297, 506, 173) clicked FileSave(6):
use load_save_slot(number=6)
hotspot (1242, 524, 506, 173) clicked FileSave(7):
use load_save_slot(number=7)
hotspot (1242, 751, 506, 173) clicked FileSave(8):
use load_save_slot(number=8)
hotspot (828, 942, 55, 55) action FilePage(1)
hotspot (936, 942, 55, 55) action FilePage(2)
hotspot (90, 424, 304, 62) action Return()
hotspot (90, 502, 304, 62) action ShowMenu('load')
screen load():
tag menu
add "gui/coverup.png"
#if main_menu:
# add "bg/T7.jpg"
imagemap:
ground "gui/load-inactive.png"
hover "gui/load-active.png"
selected_idle "gui/load-active.png"
alpha True
hotspot (567, 68, 506, 173) clicked FileLoad(1):
use load_save_slot(number=1)
hotspot (567, 295, 506, 173) clicked FileLoad(2):
use load_save_slot(number=2)
hotspot (567, 522, 506, 173) clicked FileLoad(3):
use load_save_slot(number=3)
hotspot (567, 749, 506, 173) clicked FileLoad(4):
use load_save_slot(number=4)
hotspot (1242, 70, 506, 173) clicked FileLoad(5):
use load_save_slot(number=5)
hotspot (1242, 297, 506, 173) clicked FileLoad(6):
use load_save_slot(number=6)
hotspot (1242, 524, 506, 173) clicked FileLoad(7):
use load_save_slot(number=7)
hotspot (1242, 751, 506, 173) clicked FileLoad(8):
use load_save_slot(number=8)
hotspot (828, 942, 55, 55) action FilePage(1)
hotspot (936, 942, 55, 55) action FilePage(2)
hotspot (90, 424, 304, 62) action Return()
hotspot (90, 502, 304, 62) action ShowMenu('save')
screen file_slots(title):
default page_name_value = FilePageNameInputValue(pattern=_("Page {}"), auto=_("Automatic saves"), quick=_("Quick saves"))
use game_menu(title):
fixed:
## This ensures the input will get the enter event before any of the
## buttons do.
order_reverse True
## The page name, which can be edited by clicking on a button.
button:
style "page_label"
key_events True
xalign 0.7
action page_name_value.Toggle()
## 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}Q") action FilePage("quick")
## range(1, 10) gives the numbers from 1 to 9.
for page in range(1, 10):
textbutton "[page]" action FilePage(page)
textbutton _(">") action FilePageNext()
style page_label is gui_label
style page_label_text is gui_label_text
style page_button is gui_button
style page_button_text is gui_button_text
style slot_button is gui_button
style slot_button_text is gui_button_text
style slot_time_text is slot_button_text
style slot_name_text is slot_button_text
style page_label:
xpadding 50
ypadding 3
style page_label_text:
text_align 0.5
layout "subtitle"
hover_color gui.hover_color
idle_color gui.idle_color
style page_button:
properties gui.button_properties("page_button")
style page_button_text:
properties gui.button_text_properties("page_button")
style slot_button:
properties gui.button_properties("slot_button")
style slot_button_text:
properties gui.button_text_properties("slot_button")
screen load_save_slot:
key "save_delete" action FileDelete(number)
$ file_text = "% 2s. %s\n%s" % (
FileSlotName(number, 3),
FileTime(number, empty=_("Empty Slot")),
FileSaveName(number))
add FileScreenshot(number) size(221,143) xpos -29 ypos 12
add AlphaMask("gui/circle_alphamask.png", FileScreenshot(number)) xpos -31 ypos -32
text FileTime(number, format=_("{#file_time}%A, %B %d, %H:%M"), empty=_("")):
style "slot_time_text" ypos 83 xpos 344
text FileSaveName(number):
style "slot_name_text"
screen game_menu():
tag menu
add "gui/pixel.png"