Savescreen Thumbs Won't Appear at Hotspot Locations [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
User avatar
Mink
Eileen-Class Veteran
Posts: 1099
Joined: Wed Mar 09, 2011 1:00 am
Completed: Say You Love Me (Short Version), C!P (NaNo12), Lady Misfortune, NatH, W/K, MtF, SMQ, TBM, TMHK, LoC, MMDG
Projects: Stuff
Organization: Metal Orphans
Location: Somewhere that's green
Contact:

Savescreen Thumbs Won't Appear at Hotspot Locations [Solved]

#1 Post by Mink »

^As the title says. I was using Camille's code for screen language/UI design, when I ran into this problem. The hotspots work fine; when I click them, they activate, and the game is saved. But the thumbnail showing the saved game is...elsewhere.

This is how it normally looks. I can click the space that says 'empty':
Image

This is how the thumbnails appear when I click the hotspots (which are functional-ish; they click and save):
Image

Note: Clicking from page to page is also functional.

This is 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 61 ypos 69 
   text file_text xpos 215 ypos 92 size 18 color "#ffffff"

screen file_picker:
      
   imagemap:
       ground "SL/sl_ground2.png"
       idle "SL/sl_idle2.png"
       hover "SL/sl_ground2.png"
       selected_idle "SL/sl_idle2.png"

       hotspot (1079, 158, 35, 34) clicked FilePage(1)
       hotspot (1113, 158, 35, 34) clicked FilePage(2)
       hotspot (1153, 158, 35, 34) clicked FilePage(3)
       hotspot (1193,158, 35, 34) clicked FilePage(4)
       hotspot (1228,158, 35, 34) clicked FilePage(5)

       hotspot (243, 235, 202, 114) clicked FileAction(1):
           use load_save_slot(number=1)
       hotspot (243, 415, 202, 114) clicked FileAction(2):
           use load_save_slot(number=2)
       hotspot (740, 235, 202, 114) clicked FileAction(3):
           use load_save_slot(number=3)
       hotspot (740, 415, 202, 114) clicked FileAction(4):
           use load_save_slot(number=4)
                
       hotspot (595, 569, 106, 40) action Return()   
            
screen save:
   use file_picker
   add "SL/sl_save.png"            

screen load:
   use file_picker
   add "SL/sl_load.png"

init -2 python:
    style.file_picker_frame = Style(style.menu_frame)

    style.file_picker_nav_button = Style(style.small_button)
    style.file_picker_nav_button_text = Style(style.small_button_text)

    style.file_picker_button = Style(style.large_button)
    style.file_picker_text = Style(style.large_button_text)
    config.thumbnail_width = 200
    config.thumbnail_height = 113
I don't know, maybe there's something I was supposed to change and didn't.

Also, while I'm here, and so I'm not trying to navigate between two different threads, I ended up removing the code to allow me to delete saves. I don't know how to put it back to work with Camille's code, and all subsequent tries have ended in failure/tracebacks/apoplectic rage.
Last edited by Mink on Thu Mar 14, 2013 1:13 pm, edited 1 time in total.
"I will send a fully armed battalion to remind you of my love."

***Say You Love Me***Human Enough***Cheerful!Polymorph [NaNo12][Complete!]***
Image
"Couldn't you stop this?"
"Probably, but I don't want to."


*Website, yo*

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

Re: Save Screen Thumbnails Won't Appear at Hotspot Locations

#2 Post by Alex »

Code: Select all

add FileScreenshot(number) xpos 61 ypos 69
moves the screenshot from top left corner of saveslot, so just change it.

You can place the delete action into your load_save_slot screen:

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 0 ypos 0 
   text file_text xpos 215 ypos 92 size 18 color "#ffffff"
   key "save_delete" action FileDelete(number)

User avatar
Mink
Eileen-Class Veteran
Posts: 1099
Joined: Wed Mar 09, 2011 1:00 am
Completed: Say You Love Me (Short Version), C!P (NaNo12), Lady Misfortune, NatH, W/K, MtF, SMQ, TBM, TMHK, LoC, MMDG
Projects: Stuff
Organization: Metal Orphans
Location: Somewhere that's green
Contact:

Re: Save Screen Thumbnails Won't Appear at Hotspot Locations

#3 Post by Mink »

Yep, I should've known it'd be something like that. Thanks!
"I will send a fully armed battalion to remind you of my love."

***Say You Love Me***Human Enough***Cheerful!Polymorph [NaNo12][Complete!]***
Image
"Couldn't you stop this?"
"Probably, but I don't want to."


*Website, yo*

Post Reply

Who is online

Users browsing this forum: Google [Bot]