Problem with the hotspot

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
celes91
Newbie
Posts: 22
Joined: Sun Jul 14, 2013 2:24 pm
Completed: Affection, Yuri Affection
Projects: Pure Affection
Tumblr: celeschere91
Deviantart: celes91
Location: Pastaland (Italy)
Contact:

Problem with the hotspot

#1 Post by celes91 »

I think is a simple problem, I'm just a newbie with hotspots.
I resized a GUI from 1920x1080 to 1280x720 so I changed all the hotspots, but I have still a problem with one, in the Save and Load screens. The save boxes (the white one) are smaller than the actual save preview images. What should I edit? In which file? Image
Sorry for my english.

User avatar
hell_oh_world
Miko-Class Veteran
Posts: 777
Joined: Fri Jul 12, 2019 5:21 am
Contact:

Re: Problem with the hotspot

#2 Post by hell_oh_world »

celes91 wrote: Wed Sep 11, 2019 5:35 am I think is a simple problem, I'm just a newbie with hotspots.
I resized a GUI from 1920x1080 to 1280x720 so I changed all the hotspots, but I have still a problem with one, in the Save and Load screens. The save boxes (the white one) are smaller than the actual save preview images. What should I edit? In which file? Image
Sorry for my english.
you have to resize also the thumbnail for the save slots. In your gui.rpy script, you can find these lines:

Code: Select all

## The width and height of thumbnails used by the save slots.
define config.thumbnail_width = 384 ## Set the width of the thumbnail for the save to an appropriate size
define config.thumbnail_height = 216 ## Set the height of the thumbnail for the save to an appropriate size

celes91
Newbie
Posts: 22
Joined: Sun Jul 14, 2013 2:24 pm
Completed: Affection, Yuri Affection
Projects: Pure Affection
Tumblr: celeschere91
Deviantart: celes91
Location: Pastaland (Italy)
Contact:

Re: Problem with the hotspot

#3 Post by celes91 »

I resized the tumbnail and it changed the white save slots, but I would like to resize and move the boxes that show previews and are out of places.

User avatar
hell_oh_world
Miko-Class Veteran
Posts: 777
Joined: Fri Jul 12, 2019 5:21 am
Contact:

Re: Problem with the hotspot

#4 Post by hell_oh_world »

celes91 wrote: Thu Sep 12, 2019 2:25 pm I resized the tumbnail and it changed the white save slots, but I would like to resize and move the boxes that show previews and are out of places.
You cant because they are the saves from the moment where you didn't configure the thumbnail size. Try saving onto a blank slot and you will see that it will just fit in right in. You should delete those old save because it will not be affected by the configuration on the thumbnail size as they are old saves that were saved using the default config size.

celes91
Newbie
Posts: 22
Joined: Sun Jul 14, 2013 2:24 pm
Completed: Affection, Yuri Affection
Projects: Pure Affection
Tumblr: celeschere91
Deviantart: celes91
Location: Pastaland (Italy)
Contact:

Re: Problem with the hotspot

#5 Post by celes91 »

So, now they are in the right size, but in the wrong place. And I noticed that the space between them isn't always the same
Image

rayminator
Miko-Class Veteran
Posts: 793
Joined: Fri Feb 09, 2018 12:05 am
Location: Canada
Contact:

Re: Problem with the hotspot

#6 Post by rayminator »

celes91 wrote: Sun Sep 15, 2019 10:06 am So, now they are in the right size, but in the wrong place. And I noticed that the space between them isn't always the same
Image
best thing to do is play around with the numbers one at a time until you got it in the right place

Code: Select all

## The width and height of thumbnails used by the save slots.
define config.thumbnail_width = 384 ## Set the width of the thumbnail for the save to an appropriate size
define config.thumbnail_height = 216 ## Set the height of the thumbnail for the save to an appropriate size
and I think this part you might need to change as well

Code: Select all

add FileScreenshot(slot) xalign 0.5
or this part

Code: Select all

style_prefix "slot"
xalign 1.0
yalign 0.5

User avatar
hell_oh_world
Miko-Class Veteran
Posts: 777
Joined: Fri Jul 12, 2019 5:21 am
Contact:

Re: Problem with the hotspot

#7 Post by hell_oh_world »

celes91 wrote: Sun Sep 15, 2019 10:06 am So, now they are in the right size, but in the wrong place. And I noticed that the space between them isn't always the same
Image
Now that you changed the thumbnail size, change also the button size for the save slot so that it will fit. The thumbnail size and the button size for the save slot should be the same if you want it to fit in.

The following codes are can be found in your gui.rpy...

Code: Select all

## File Slot Buttons ###########################################################
##
## A file slot button is a special kind of button. It contains a thumbnail
## image, and text describing the contents of the save slot. A save slot uses
## image files in gui/button, like the other kinds of buttons.

## The save slot button.
define gui.slot_button_width = 414 ## Make this the same as the size of the thumbnail.
define gui.slot_button_height = 309 ## Make this the same as the size of the thumbnail.
Additionally, if the above doesn't seem to work, adjust the borders for the save slot.

Code: Select all

define gui.slot_button_borders = Borders(15, 15, 15, 15) ## Set this to 4 zeros if there's still gap in the save slot.
Lemme know if none of these worked. :D

celes91
Newbie
Posts: 22
Joined: Sun Jul 14, 2013 2:24 pm
Completed: Affection, Yuri Affection
Projects: Pure Affection
Tumblr: celeschere91
Deviantart: celes91
Location: Pastaland (Italy)
Contact:

Re: Problem with the hotspot

#8 Post by celes91 »

I found the problem, it was merely this code on screens.rpy

Code: Select all

add FileScreenshot(number) xpos 0.5 ypos 0.5
key "save_delete" action FileDelete(number)
I changed to 0.0 and now the thumbnails fit
Image
Thank you all for your help!

Post Reply

Who is online

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