Imagemap bug

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
warmsundae
Regular
Posts: 61
Joined: Tue Feb 24, 2015 9:51 pm
Skype: electriclan
Soundcloud: lanterny
Location: korea
Contact:

Imagemap bug

#1 Post by warmsundae » Fri Mar 27, 2015 2:29 am

Image

I used an imagemap to desin a save/load menu, but a little part of the selected menu is still there when it's not selected. It's really weird, so I rechecked the coordinates.
Nothing happened.
Here's the code:

Code: Select all

##############################################################################
# Save, Load
#
# Screens that allow the user to save and load the game.
# http://www.renpy.org/doc/html/screen_special.html#save
# http://www.renpy.org/doc/html/screen_special.html#load

# Since saving and loading are so similar, we combine them into
# a single screen, file_picker. We then use the file_picker screen
# from simple load and save screens.
    
screen load_save_slot:
    $ file_text = "%2s. %s\n  %s" % (
                        FileSlotName(number, 4),
                        FileTime(number, empty=_("Empty Slot.")),
                        FileSaveName(number))

    add FileScreenshot(number) xpos 61 ypos 69 
    text file_text xpos 215 ypos 92 size 18 color "#261d0c"
    
screen file_picker:
    key "w" action FileLoad(1, page="quick", confirm=True, newest=False)
    key "m" action MainMenu(confirm=True)
    key "p" action ShowMenu("preferences")
    key "mouseup_3" action ShowMenu("keys_map")
    key "K_ESCAPE" action Return()
    
    imagemap:
            ground "gui/saveload_idle.png"
            idle "gui/saveload_idle.png"
            hover "gui/saveload_hover.png"
            selected_idle "gui/saveload_selected.png"
            selected_hover "gui/saveload_hover.png"

            hotspot (250, 28, 12, 25) clicked FilePage(1)
            hotspot (272, 29, 16, 24) clicked FilePage(2)
            hotspot (303, 29, 13, 23) clicked FilePage(3)
            hotspot (330, 29, 17, 23) clicked FilePage(4)
            hotspot (363, 29, 13, 23) clicked FilePage(5)
            hotspot (389, 29, 18, 24) clicked FilePage(6)
            hotspot (418, 29, 15, 23) clicked FilePage(7)
            hotspot (447, 29, 16, 23) clicked FilePage(8)
            hotspot (476, 29, 16, 25) clicked FilePage(9)

            hotspot (25, 72, 669, 117) clicked FileAction(1):
                use load_save_slot(number=1)
            hotspot (24, 198, 668, 119) clicked FileAction(2):
                use load_save_slot(number=2)
            hotspot (24, 326, 668, 117) clicked FileAction(3):
                use load_save_slot(number=3)
            hotspot (24, 455, 668, 115) clicked FileAction(4):
                use load_save_slot(number=4)
                
            hotspot (523, 68, 62, 31) action ShowMenu("load")
            hotspot (724, 73, 66, 15) action ShowMenu("save")
            hotspot (728, 525, 55, 34) action Quit()
            hotspot (725, 17, 64, 24) action ShowMenu('stats')
            hotspot (720, 481, 74, 20) action MainMenu()
            hotspot (725, 162, 69, 27) action Return()
            hotspot (725, 107, 68, 36) action ShowMenu("preferences")
            
screen save:
    
    use file_picker

screen load:

    tag menu
    use file_picker
I also have a problem configuring the white boxes next to the save slot to be filled in by the screen image. How can I change that?

philat
Eileen-Class Veteran
Posts: 1853
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: Imagemap bug

#2 Post by philat » Fri Mar 27, 2015 9:00 am

Try deleting the cache folder.

Use config.thumbnail_height and config.thumbnail_width to adjust the screenshot size.

User avatar
warmsundae
Regular
Posts: 61
Joined: Tue Feb 24, 2015 9:51 pm
Skype: electriclan
Soundcloud: lanterny
Location: korea
Contact:

Re: Imagemap bug

#3 Post by warmsundae » Fri Mar 27, 2015 12:38 pm

I took the advice and deleted the cache folder and it isn't working.
The thumbnail is working, though, so that's all great. Thanks!

I think I'm going to try messing around with the screens code again, but I don't think I'll have any luck.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Ocelot, zyric