Save/load menu issues with Prev/Next hotspots (SOLVED)

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
clannadman

Save/load menu issues with Prev/Next hotspots (SOLVED)

#1 Post by clannadman »

I'm using screens.rpy for my hotspot images on all my menus. I've encountered something in my Save/Load screen where if the Next or Previous buttons reach their limit (5 screens of slots in my case) then a white block is left behind as the hotspot disappears. Is there any way to change this so that a white block doesn't appear but instead we see the ground image?

My code:

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 11 ypos 7
    text file_text xpos 80 ypos 10

screen file_picker:

    imagemap:
        ground "gm_mainground.png"
        idle "loadsave_idle.png"
        hover "loadsave_hover.png"
        selected_idle "loadsave_selected_idle.png"
        selected_hover "loadsave_selected_hover.png"
        
        hotspot (249, 72, 48, 23) clicked FilePagePrevious()
        hotspot (309, 72, 55, 23) clicked FilePage("auto")
        hotspot (380, 72, 14, 23) clicked FilePage(1)
        hotspot (409, 72, 19, 23) clicked FilePage(2)
        hotspot (440, 72, 18, 23) clicked FilePage(3)
        hotspot (471, 72, 18, 23) clicked FilePage(4)
        hotspot (501, 72, 18, 23) clicked FilePage(5)
        hotspot (531, 72, 55, 23) clicked FilePageNext(5)
                               
        hotspot (246, 110, 342, 63) clicked FileAction(1):
            use load_save_slot(number=1)
        hotspot (246, 182, 342, 63) clicked FileAction(2):
            use load_save_slot(number=2)
        hotspot (246, 253, 342, 64) clicked FileAction(3):
            use load_save_slot(number=3)
        hotspot (246, 326, 342, 64) clicked FileAction(4):
            use load_save_slot(number=4)

                    
screen save:

    # This ensures that any other menu screen is replaced.
    tag menu
    
    use file_picker
    use navigation
    

screen load:

    # This ensures that any other menu screen is replaced.
    tag menu

    use file_picker
    use navigation

            
The white block appearing where the Next hotspot used to be:
Capture.PNG
Last edited by clannadman on Tue Jul 05, 2011 1:16 pm, edited 1 time in total.

User avatar
Alex
Lemma-Class Veteran
Posts: 3094
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Save/load menu issues with Prev/Next hotspots

#2 Post by Alex »

Hm, try to add an "insensitive" image to imagemap

Code: Select all

imagemap:
        ground "gm_mainground.png"
        insensitive "insensitive_ground.png"
        idle "loadsave_idle.png"
        #rest of the code
http://www.renpy.org/doc/html/screens.h ... statements

(untested)

clannadman

Re: Save/load menu issues with Prev/Next hotspots

#3 Post by clannadman »

That's done it. Thankyou :)

Post Reply

Who is online

Users browsing this forum: No registered users