Problem with Imagemaps Save/Load Screens

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
Diathorn
Newbie
Posts: 3
Joined: Wed Aug 16, 2017 4:45 pm
Contact:

Problem with Imagemaps Save/Load Screens

#1 Post by Diathorn »

Hello.
I've encountered a rather strange problem.
Here's how it looks
Save Screen (works)
Image

Load Screen ( doesn't work, there's this weird transparency where the idle part of imagemap is, but only for parts that don't have a save slot taken)

Image

Here's the code for screens:

Code: Select all

screen load_save_slot:
    $ file_text = "% 2s. %s\n%s" % (
                        FileSlotName(number, 4),
                        FileTime(number, empty=_("Empty Slot")),
                        FileSaveName(number))

    add FileScreenshot(number) xpos 220 ypos 20
    text file_text xpos 0 ypos 10 size 40 color "#ffffff" outlines [ (2, "#302B54") ] kerning 2 font "gui/SairaSemiCondensed-Black.ttf"
    
    key "save_delete" action FileDelete(number)
    
init -2 python:
    
    config.thumbnail_width = 180
    config.thumbnail_height = 150  
    
screen ssave():

    tag menu
    imagemap:
        ground "images/menu_save_ground.png"
        idle "images/menu_save_idle.png"
        hover "images/menu_save_hover.png"
        cache False
        alpha False
     
        
        
        hotspot (142, 394, 162, 93) action Start()
        hotspot (149, 560, 154, 91) action ShowMenu("load")
        hotspot (147, 675, 133, 89) action Quit()  
        hotspot (153, 908, 207, 94) action Return() 
        
        hotspot (544, 142, 814, 200) clicked FileSave(1):
            use load_save_slot(number=1) 
        hotspot (544, 355, 818, 196) clicked FileSave(2):
            use load_save_slot(number=2) 
        hotspot (540, 559, 818, 193) clicked FileSave(3):
            use load_save_slot(number=3) 
        hotspot (544, 758, 823, 209) clicked FileSave(4):
            use load_save_slot(number=4) 



screen load():

    tag menu
    imagemap:
        
        ground "images/menu_load_ground.png"
        idle "images/menu_load_idle.png"
        hover "images/menu_load_hover.png"
       
    
        hotspot (143, 393, 162, 95)action Start()
        hotspot (139, 555, 150, 92)action ShowMenu("ssave")
        hotspot (150, 674, 133, 81) action Quit()  
        hotspot (150, 904, 207, 104) action Return() 
        
        
            
        hotspot (544, 142, 814, 200) clicked FileLoad(1):
            use load_save_slot(number=1) 
        hotspot (544, 355, 818, 196) clicked FileLoad(2):
            use load_save_slot(number=2) 
        hotspot (540, 559, 818, 193) clicked FileLoad(3):
            use load_save_slot(number=3) 
        hotspot (544, 758, 823, 209) clicked FileLoad(4):
            use load_save_slot(number=4) 

User avatar
PyTom
Ren'Py Creator
Posts: 16088
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Problem with Imagemaps Save/Load Screens

#2 Post by PyTom »

It seems like your images are wrong. If you want help, you'll need to post the actual game resources, not just screenshots of the problem.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Diathorn
Newbie
Posts: 3
Joined: Wed Aug 16, 2017 4:45 pm
Contact:

Re: Problem with Imagemaps Save/Load Screens

#3 Post by Diathorn »

Hello.
Thank you for reply.
Sadly, I got into some other issues with imagemaps (some weird scaling artifacts), got mad, deleted everything and redid the whole thing with imagebuttons.

From what I remember, the ground image was the white stuff outsie of the boxes
and the idle and hover area was the boxes (including whats inside them)

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot], Semrush [Bot]