Save/Load screen FilePagePrevious goes beyond 1

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
belphe
Newbie
Posts: 9
Joined: Fri Sep 30, 2016 8:05 pm
Contact:

Save/Load screen FilePagePrevious goes beyond 1

#1 Post by belphe » Mon Jul 08, 2019 12:18 pm

Hi all,

I've replaced my default menu with a custom imagemap GUI, and worked all of the kinks out of it except this one that isn't really game-breaking, but it's annoying.

While I've used FilePageNext(max=18, wrap=False) to stop my save/load menu from scrolling into oblivion, I now seem to have an issue where my FilePagePrevious scrolls beyond page 1 and I end up with two pages of "negative" save files numbered q1-q8 and a1-a8. I've been all over the forums looking for a solution to fixing this, and I've not been able to find one.

This is the code for my load menu:

Code: Select all

screen load():

    tag menu
    
    add "gui/loadgame_ground.png"

    imagemap:
        ground "gui/loadgame_idle.png"
        idle "gui/loadgame_idle.png"
        hover "gui/loadgame_hover.png"
        selected_idle "gui/loadgame_hover.png"
        selected_hover "gui/loadgame_hover.png"
        alpha False

        cache False
        
        hotspot (22,546,44,15) clicked FilePagePrevious(max=18, wrap=True) 
        hotspot (76,546,19,20) clicked FilePage(1) 
        hotspot (100,546,19,20) clicked FilePage(2) 
        hotspot (125,546,19,20) clicked FilePage(3) 
        hotspot (151,546,19,20) clicked FilePage(4) 
        hotspot (177,546,19,20) clicked FilePage(5) 
        hotspot (202,546,19,20) clicked FilePage(6)  
        hotspot (226,546,19,20) clicked FilePage(7) 
        hotspot (251,546,19,20) clicked FilePage(8) 
        hotspot (277,546,19,20) clicked FilePage(9)
        hotspot (303,546,19,20) clicked FilePage(10)
        hotspot (330,546,19,20) clicked FilePage(11)
        hotspot (354,546,19,20) clicked FilePage(12)
        hotspot (379,546,19,20) clicked FilePage(13)
        hotspot (405,546,19,20) clicked FilePage(14)
        hotspot (431,546,19,20) clicked FilePage(15)
        hotspot (456,546,19,20) clicked FilePage(16)
        hotspot (480,546,19,20) clicked FilePage(17)
        hotspot (505,546,19,20) clicked FilePage(18)
        hotspot (534,546,44,15) clicked FilePageNext(max=18, wrap=True) 
    
        hotspot (23,127,363,87) clicked FileLoad(1):
            use load_save_slot(number=1) 
            key "save_delete" action FileDelete(1)


        hotspot (405,127,363,87) clicked FileLoad(2):
            use load_save_slot(number=2)
            key "save_delete" action FileDelete(2)

            
        hotspot (23,228,363,87) clicked FileLoad(3):
            use load_save_slot(number=3)
            key "save_delete" action FileDelete(3)


        hotspot (405,228,363,87) clicked FileLoad(4):
            use load_save_slot(number=4)
            key "save_delete" action FileDelete(4)


        hotspot (23,328,363,87) clicked FileLoad(5):
            use load_save_slot(number=5)
            key "save_delete" action FileDelete(5)


        hotspot (405,327,363,87) clicked FileLoad(6):
            use load_save_slot(number=6) 
            key "save_delete" action FileDelete(6)

            
        hotspot (23,428,363,87) clicked FileLoad(7):
            use load_save_slot(number=7) 
            key "save_delete" action FileDelete(7)

            
        hotspot (405,427,363,87) clicked FileLoad(8):
            use load_save_slot(number=8) 
            key "save_delete" action FileDelete(8)


            
            

        hotspot (117, 43, 84, 23) action ShowMenu("save") 
        hotspot (209, 43, 84, 23) action MainMenu() 
        hotspot (23, 43, 84, 23) action Return() 

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: Save/Load screen FilePagePrevious goes beyond 1

#2 Post by Remix » Mon Jul 08, 2019 1:40 pm

The qN and aN saves are quick saves and auto saves... If you are not using them you might want to make sure they are turned off in the config settings...

Anyway, as far as I know, just add , auto=False, quick=False) to your previous/next calls...

Code: Select all

FilePagePrevious(max=18, wrap=True, auto=False, quick=False)
Frameworks & Scriptlets:

belphe
Newbie
Posts: 9
Joined: Fri Sep 30, 2016 8:05 pm
Contact:

Re: Save/Load screen FilePagePrevious goes beyond 1

#3 Post by belphe » Mon Jul 08, 2019 2:29 pm

Remix wrote:
Mon Jul 08, 2019 1:40 pm
The qN and aN saves are quick saves and auto saves... If you are not using them you might want to make sure they are turned off in the config settings...

Anyway, as far as I know, just add , auto=False, quick=False) to your previous/next calls...

Code: Select all

FilePagePrevious(max=18, wrap=True, auto=False, quick=False)
Holy crap, thank you so much. I was losing my mind! lol

I really appreciate you taking the time to help <3

Post Reply

Who is online

Users browsing this forum: No registered users