The goal is to have it set up so that when the user clicks a save file on the left, the associated screenshot will be shown on the right, and they will be able to save/load using the selected slot.
The part where I am getting hung up is proper showing/hiding of the individual file screenshots. I can fetch and show one with FileScreenshot(slot_num), but I can't figure out how to make this work with the button click. Does anyone have suggestions for the best way to get this working? The code for the screen definition I am using is below so you know where I'm at.
(P.S I am fairly experienced at programming, so don't shy away from python-intensive solutions.)
Code: Select all
def game_saves(x_pos, y_pos, **kwargs):
ui.frame(xminimum = 950, xmaximum = 950,
yminimum = 475, ymaximum = 475,
xpos = x_pos, ypos = y_pos)
ui.viewport(id = "save_port", mousewheel = True)
ui.vbox(xpos = 30, ypos = 13)
for i in range(1, 25):
ui.button(clicked = FileAction(i), #placeholder. Goal is to have this hide prev image and show new one at right
xminimum = 300, xmaximum = 300,
yminimum = 15, ymaximum = 15)
file_name = FileSlotName(i, 25)
file_time = FileTime(i, empty=_("Empty Slot."))
save_name = FileSaveName(i)
ui.text("{0} {1}\n{2})".format(file_name, file_time, save_name), size=15)
ui.close()
ui.vbar(value = YScrollValue("save_port"), xpos = 300)
renpy.define_screen("game_saves", game_saves)