Error aligning the save thumbnail

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
ririkutai
Newbie
Posts: 1
Joined: Tue Nov 19, 2019 6:13 pm
Projects: Ise & Kai: Chosen Throne
Organization: Rie Indie Games
Tumblr: ririkutai
itch: ririkutai
Location: Canada
Contact:

Error aligning the save thumbnail

#1 Post by ririkutai » Tue Nov 19, 2019 6:57 pm

Hello, forgive me if this question has been asked before.

I'm having trouble aligning save thumbnails inside my custom SAVE/LOAD GUI. There are two rows and 3 columns, totalling 6 save slots in all.

While the 1st slot is aligned inside the GUI, I cannot repeat the process with the remaining 5 slots. I'm new to Ren'py, so my current code is as follows;

Code: Select all

screen load_save_slot:
    $ file_text = "% s\n  %s" % (FileTime(number, empty="Empty Slot"), FileSaveName(number))
    add FileScreenshot(number) xpos 18 ypos 24
    text file_text xpos 11 ypos -24 size 15  color "#000000"

screen save():

    tag menu

    imagemap:
        ground 'gui/save_ground.png'
        idle 'gui/save_idle.png'
        hover 'gui/save_selected.png'
        selected_idle 'gui/save_selected.png'
        selected_hover 'gui/save_selected.png'
        cache False

        #Page Numbers
        hotspot (492, 916, 122, 47) action FilePagePrevious()
        hotspot (639, 891, 42, 72) action FilePage(1)
        hotspot (686, 891, 45, 72) action FilePage(2)
        hotspot (737, 891, 44, 72) action FilePage(3)
        hotspot (789, 891, 44, 72) action FilePage(4)
        hotspot (838, 891, 42, 72) action FilePage(5)
        hotspot (888, 891, 43, 72) action FilePage(6)
        hotspot (940, 891, 43, 72) action FilePage(7)
        hotspot (990, 891, 41, 72) action FilePage(8)
        hotspot (1040, 891, 43, 72) action FilePage(9)
        hotspot (1091, 891, 43, 72) action FilePage(10)
        hotspot (1138, 891, 45, 72) action FilePage(11)
        hotspot (1189, 891, 44, 72) action FilePage(12)
        hotspot (1255, 916, 123, 47) action FilePageNext()

        #Actual save/load slots.
        hotspot (222, 298, 453, 269) action FileAction(1):
            use load_save_slot(number=1)
        hotspot (709, 298, 455, 269) action FileAction(2):
            use load_save_slot(number=2)
        hotspot (1196, 298, 455, 269) action FileAction(3):
            use load_save_slot(number=3)
        hotspot (222, 619, 453, 263) action FileAction(4):
            use load_save_slot(number=4)
        hotspot (709, 619, 455, 263) action FileAction(5):
                use load_save_slot(number=5)
        hotspot (1196, 619, 455, 263) action FileAction(6):
                use load_save_slot(number=6)

        hotspot (340, 124, 274, 118) action ShowMenu('load')
        hotspot (119, 124, 176, 118) action Return()
init python:
    config.thumbnail_width = 419
    config.thumbnail_height = 234

I'm certain there's a better way to code this, in addition to solving my problem. Any help would be greatly appreciated!
Attachments
GUI_Error.PNG
The mentioned error

Post Reply

Who is online

Users browsing this forum: Google [Bot], IaMe