Problems in customizing the Load/Save menu and Yes/No Prompt

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
PitchySoldier
Newbie
Posts: 14
Joined: Wed Jul 23, 2014 8:21 am
Projects: True Friends
Contact:

Problems in customizing the Load/Save menu and Yes/No Prompt

#1 Post by PitchySoldier »

Hello!
Well, I was customizing the entire menu and I have the next problems:
First, the Yes/No Prompt, I put all the images the game need but instead of the "Are you sure you want to quit?" only appears de "Are you sure?" Also, the Yes/No buttons doesn't appears and it seems like this

All the titles are transparent and the code it seems to doesn't have any problem
screen yesno_prompt:
#on "show" action With(dissolve)

modal True

imagemap:
ground "background2.jpg"
idle "yesno_idle.png"
hover "yesno_hover.png"

hotspot (170, 457, 155, 75) action yes_action
hotspot (512, 451, 159, 96) action no_action

#text _(message):
# xalign 0.5
# yalign 0.5

if message = layout.ARE_YOU_SURE:
add "yesno_are_you_sure.png"

elif message = layout.DELETE_SAVE:
add "yesno_delete_save.png"

elif message = layout.OVERWRITE_SAVE:
add "yesno_overwrite_save.png"

elif message = layout.LOADING:
add "yesno_loading.png"

elif message = layout.QUIT:
add "yesno_quit.png"

elif message = layout.MAIN_MENU:
add "yesno_main_menu.png"


# Right-click and escape answer "no".
key "game_menu" action no_action

init -2:
style yesno_button:
size_group "yesno"

style yesno_label_text:
text_align 0.5
layout "subtitle"

Next is the Load/Save game menu, I follow multiples tutorials like this one and this one
And I cannot change the background and anything else, it looks like the default style one and I don't know what else I can do.
screen save:
tag menu
add "savegamebc.png" # The Background Image
use navigation
use file_picker

screen load:
tag menu
add "loadasavegame.png" # The Background Image
use navigation
use file_picker

init -2:
##The save/load slots.
style large_button background Frame("button2.png",5,5)
style large_button hover_background Frame("button1.png",5,5)
style large_button yminimum 50
style large_button ypadding 3

style file_picker_frame top_margin 45
style file_picker_frame left_margin 40
style file_picker_frame right_margin 40
style file_picker_frame bottom_margin 20

style file_picker_nav_button xalign .98
I hope you can help me with that!

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

Re: Problems in customizing the Load/Save menu and Yes/No Pr

#2 Post by Alex »

The main problem is the order of elements in your screens. You see, things are showing onscreen in order you code them, so your yes/no imagemap just hidden under the "yesno_are_you_sure.png" - move the imagemap part right after the if/elif part.
As for save/load screen, navigation has the background that you see, so either add your image into navigation screen or set the "gm_root" property in options.rpy.

User avatar
PitchySoldier
Newbie
Posts: 14
Joined: Wed Jul 23, 2014 8:21 am
Projects: True Friends
Contact:

Re: Problems in customizing the Load/Save menu and Yes/No Pr

#3 Post by PitchySoldier »

Thank you for your help! But it didn't work either.
Now, only the background appears if I put the imagemap (with and without the hotspot or the code of the text) after or before the entire code of Are You Sure.
And about the Load/Save menu it didn't work...
I only want to change the backgroudns and the buttons because it looks like this.

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

Re: Problems in customizing the Load/Save menu and Yes/No Pr

#4 Post by Alex »


User avatar
PitchySoldier
Newbie
Posts: 14
Joined: Wed Jul 23, 2014 8:21 am
Projects: True Friends
Contact:

Re: Problems in customizing the Load/Save menu and Yes/No Pr

#5 Post by PitchySoldier »

Yeah I tried it but it always appears some errors. I know I have to delete the dots but I'll put in red what the game said to me. I'm sorry if I didn't understand well the codes!
In the Load/Save Game
init -2 python:
##The save/load slots.
style.large_button_text.font = "AUBREY1__.TTF" <-- Here any kind of font works? because the game say that the font is not found
style.large_button.background = Frame("ui/save_button_idle.png",5,5)
style.large_button.hover_background = Frame("ui/save_button_hover.png",5,5)
style.large_button.selected_background = Frame("ui/save_button_selected.png",5,5)
style.large_button.selected_hover_background = Frame("ui/save_button_hover.png",5,5) The lastest ones I have to delete the "=" and it didn't show the images
style.large_button.yminimum = 50
style.large_button.ypadding = 3

## The size of the Save/Load thumbnails
config.thumbnail_width = 150
config.thumbnail_height = 100

style.file_picker_frame = Style(style.menu_frame) <--What I supposed to put in the Style?

style.file_picker_frame.top_margin = 85
style.file_picker_frame.left_margin = 80
style.file_picker_frame.right_margin = 80
style.file_picker_frame.bottom_margin = 40 <-- In these ones the game doesn't know what a top margin is?

style.file_picker_nav_button.xalign = 0.5

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)

Also the code I put in the Yes/No Prompt are the same but with my images and coordenates but nothing, it didn't show anyway :/

User avatar
OokamiKasumi
Eileen-Class Veteran
Posts: 1779
Joined: Thu Oct 14, 2010 3:53 am
Completed: 14 games released -- and Counting.
Organization: DarkErotica Games
Deviantart: OokamiKasumi
Location: NC, USA
Contact:

Re: Problems in customizing the Load/Save menu and Yes/No Pr

#6 Post by OokamiKasumi »

In the Load/Save Screen

You MUST use a font you actually have or it will trip an error. If you are not using a specific font add a # to the front of the line and it will no longer read that line of code.

Code: Select all

init -2 python:
    ##The save/load slots.
    # style.large_button_text.font = "AUBREY1__.TTF" 
Check what FOLDER your buttons are in INSIDE the game folder. The folder I had my buttons in was called ui. ( ui/ ) If your buttons are in a different folder, you'll need to Change the ui/ to show the name of YOUR folder. ( yourfile/ )If your buttons are in the Game folder then you don't need anything except the name of the buttons.

If you do Not have these buttons at all, then erase this entire block.

Code: Select all

    style.large_button.background = Frame("ui/save_button_idle.png",5,5)
    style.large_button.hover_background = Frame("ui/save_button_hover.png",5,5)
    style.large_button.selected_background = Frame("ui/save_button_selected.png",5,5)
    style.large_button.selected_hover_background = Frame("ui/save_button_hover.png",5,5) 
You don't put Anything at all in here.

Code: Select all

    style.file_picker_frame = Style(style.menu_frame)
This is telling the screen to use the frame image of the game's THEME style. If you changed the frame image to one of your own, it will use that frame image instead.

The top margin indicates how many pixels the FRAME is from the top of the screen. How far the TEXT is from the top of the frame is handled elsewhere.

Code: Select all

    style.file_picker_frame.top_margin = 85 
    style.file_picker_frame.left_margin = 80
    style.file_picker_frame.right_margin = 80
    style.file_picker_frame.bottom_margin = 40 
Last edited by OokamiKasumi on Mon Aug 11, 2014 11:02 pm, edited 1 time in total.
Ookami Kasumi ~ Purveyor of fine Smut.
Most recent Games Completed: For ALL my completed games visit: DarkErotica Games

"No amount of great animation will save a bad story." -- John Lasseter of Pixar

User avatar
PitchySoldier
Newbie
Posts: 14
Joined: Wed Jul 23, 2014 8:21 am
Projects: True Friends
Contact:

Re: Problems in customizing the Load/Save menu and Yes/No Pr

#7 Post by PitchySoldier »

Oh! I understand now, thank you so much it works now!

User avatar
OokamiKasumi
Eileen-Class Veteran
Posts: 1779
Joined: Thu Oct 14, 2010 3:53 am
Completed: 14 games released -- and Counting.
Organization: DarkErotica Games
Deviantart: OokamiKasumi
Location: NC, USA
Contact:

Re: Problems in customizing the Load/Save menu and Yes/No Pr

#8 Post by OokamiKasumi »

PitchySoldier wrote:Oh! I understand now, thank you so much it works now!
I'm glad I could help.
-- Sometimes I forget that people new to Ren'Py may not realize when I've added things to the code such as folder names, additional graphics, or the names of fonts that they might not have. My apologies.
Ookami Kasumi ~ Purveyor of fine Smut.
Most recent Games Completed: For ALL my completed games visit: DarkErotica Games

"No amount of great animation will save a bad story." -- John Lasseter of Pixar

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Ocelot