Ren'Py Change size of save/load thumbnail. [Solved.]

KanCerberus

Naked Holidays Dev
Game Developer
Nov 3, 2019
50
336
Hello, I apologize in advance for being a newbie. My problem is the following one:
I am trying to make a custom save and load screen, but thethumbnails are too small.

menu.PNG

Apart from the mess, does anyone know how to resize the images? The code I use is the following:

Code:
screen load():

    tag menu
    imagemap:
        ground 'gui/load & save/load_idle.png'
        idle 'gui/load & save/load_idle.png'
        hover 'gui/load & save/load_hover.png'
        selected_idle 'gui/load & save/load_sele.png'
        selected_hover 'gui/load & save/load_idle.png'

        cache False
        alpha True

        hotspot (195, 278, 100, 65) action FilePage(1)
        hotspot (195, 358, 100, 65) action FilePage(2)
        hotspot (195, 440, 100, 65) action FilePage(3)
        hotspot (195, 527, 100, 65) action FilePage(4)
        hotspot (195, 607, 100, 65) action FilePage(5)
        hotspot (195, 688, 100, 65) action FilePage(6)


        hotspot (420, 150, 450, 160) action FileAction(1):
            use load_save_slot(number=1)
        hotspot (420, 450, 450, 160) action FileAction(2):
            use load_save_slot(number=2)
        hotspot (420, 900, 266, 160) action FileAction(3):
            use load_save_slot(number=3)
        hotspot (845, 150, 265, 160) action FileAction(4):
            use load_save_slot(number=4)
        hotspot (845, 300, 263, 160) action FileAction(5):
            use load_save_slot(number=5)
        hotspot (845, 900, 268, 160) action FileAction(6):
            use load_save_slot(number=6)


        hotspot (1780, 30, 100, 100) action Return()
        hotspot (1553, 180, 230, 70) action ShowMenu("load")
        hotspot (1450, 280, 350, 95) action ShowMenu("preferences")
        hotspot (1312, 400, 475, 85) action ShowMenu("characters")

        hotspot (1445, 510, 333, 85)action OpenURL("https://www.patreon.com/user?u=51294394")

        hotspot (1560, 625, 250, 85) action ShowMenu("main_menu")



        imagebutton auto "gallery/pic/Button/back_%s.png"  action Return()  xpos 1560 ypos 780





screen load_save_slot:
    $ file_text = "% s\n  %s" % (FileTime(number, empty=" "), FileSaveName(number))
    add FileScreenshot(number) xpos 11 ypos 43
    text file_text xpos 55 ypos 10 size 20  color "#ffffff"
I have tried to manually resize the images but nothing happens (using the numbers next to the coordinates). I have also tried to insert this at the beginning of the script (and nothing happens):
Code:
init python:
    config.thumbnail_width = 120
    config.thumbnail_height = 90

Thank you!
 
Last edited:

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,607
2,256
Thumbnail images are sized when they are saved and the image is part of the save file itself.

They are controlled by a couple of lines in the gui.rpy...

define config.thumbnail_width = 384
define config.thumbnail_height = 216

Though that is only the default method, and custom code can do anything it likes.

If you change the size/layout of the load/save screens ( screen file_slots(): ) after you already have save files - things will look broken. The answer is usually to delete the save files with the incorrect (according to the new layout) sizes and start again from scratch.

Of course, it's equally possible they changed the screen and weren't immediately aware that config.thumbnail_width and config.thumbnail_height needed changing to match.
 

YaYa_UnTIN2

Misunderstood Thinker
Donor
Dec 19, 2017
623
706
Thumbnail images are sized when they are saved and the image is part of the save file itself.

They are controlled by a couple of lines in the gui.rpy...

define config.thumbnail_width = 384
define config.thumbnail_height = 216

Though that is only the default method, and custom code can do anything it likes.

If you change the size/layout of the load/save screens ( screen file_slots(): ) after you already have save files - things will look broken. The answer is usually to delete the save files with the incorrect (according to the new layout) sizes and start again from scratch.

Of course, it's equally possible they changed the screen and weren't immediately aware that config.thumbnail_width and config.thumbnail_height needed changing to match.
Thanks for the reply, the info will help. :)
 

crabsinthekitchen

Well-Known Member
Apr 28, 2020
1,565
9,063
screen load_save_slot:
$ file_text = "% s\n %s" % (FileTime(number, empty=" "), FileSaveName(number))
add FileScreenshot(number) xpos 11 ypos 43
text file_text xpos 55 ypos 10 size 20 color "#ffffff"[/CODE]
Here, when you add a screenshot, you can specify the size so it should look fine without having to delete old saves
add FileScreenshot(number) xpos 11 ypos 43 size(config.thumbnail_width, config.thumbnail_height)

Deleting saves when you change the layout shouldn't be necessary