Missing menu dialogue(Solved!)
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.
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.
-
- Newbie
- Posts: 23
- Joined: Tue Nov 05, 2019 8:27 pm
- Projects: Slippery Kiss
- Deviantart: dreadfulenchanted
- Contact:
Missing menu dialogue(Solved!)
Hello! I am about to release the second chapter of my game soon. Its added onto the first instance of the game so the save data is transferred over automatically. However, when I go to load save data from the first game, I get a second dialogue box that's blank.
Hitting yes loads the save data fine, but I have no idea what dialogue goes here or what code I need to add it in.
Any help would be appreciated!
Hitting yes loads the save data fine, but I have no idea what dialogue goes here or what code I need to add it in.
Any help would be appreciated!
Last edited by DreadfulEnchanted on Thu Jul 27, 2023 7:30 pm, edited 1 time in total.
-
- Veteran
- Posts: 293
- Joined: Fri Sep 17, 2021 2:09 am
- Organization: enaielei
- Tumblr: enaielei
- Deviantart: enaielei
- Github: enaielei
- Skype: enaielei
- Soundcloud: enaielei
- itch: enaielei
- Discord: enaielei#7487
- Contact:
Re: Missing menu dialogue?
Probably provide the code for your file_slots screen, as well as the code for the confirm screen.
-
- Newbie
- Posts: 23
- Joined: Tue Nov 05, 2019 8:27 pm
- Projects: Slippery Kiss
- Deviantart: dreadfulenchanted
- Contact:
Re: Missing menu dialogue?
Sure thing! Here they are
Code: Select all
################################################################################
# Confirm screen
################################################################################
screen confirm(message, yes_action, no_action):
modal True
zorder 200
style_prefix "confirm"
add 'images/gui/confirm_overlay.png'
frame:
pos(647, 389)
if message == gui.ARE_YOU_SURE:
label _('Are you sure?') style "confirm_prompt_text"
if message == gui.DELETE_SAVE:
label _('Delete the save?') style "confirm_prompt_text"
if message == gui.OVERWRITE_SAVE:
label _('Overwrite the save?') style "confirm_prompt_text"
if message == gui.LOADING:
label _('Load the save?') style "confirm_prompt_text"
if message == gui.QUIT:
label _('Quit the game?') style "confirm_prompt_text"
if message == gui.MAIN_MENU:
label _('Return to the title?') style "confirm_prompt_text"
if message == gui.END_REPLAY:
label _('End the replay?') style "confirm_prompt_text"
if message == gui.SLOW_SKIP:
label _('Start skipping?') style "confirm_prompt_text"
if message == gui.FAST_SKIP_SEEN or message == gui.FAST_SKIP_UNSEEN:
label _('Skip to next important scene?') style "confirm_prompt_text"
vbox:
button:
action yes_action
text _('Yes')
button:
action no_action
text _('No')
key "game_menu" action no_action
style confirm_frame:
background None
padding(0, 0)
xysize(638, 162)
style confirm_prompt_text:
text_align .5
align(.5, .5)
style confirm_prompt_text_text:
color '#6e4ea7'
font gui.font_face_bold
size 32
kerning 1.5
style confirm_vbox:
anchor(1.0, .0)
pos(1052, 559)
spacing 3
style confirm_button:
insensitive_background 'images/gui/nav_btn_ground.png'
idle_background 'images/gui/nav_btn_idle.png'
hover_background 'images/gui/nav_btn_hover.png'
selected_idle_background 'images/gui/nav_btn_hover.png'
selected_hover_background 'images/gui/nav_btn_hover.png'
xysize(345, 90)
style confirm_text:
insensitive_color gui.btn_insensitive_color
idle_color gui.btn_idle_color
hover_color gui.btn_selected_idle_color
selected_idle_color gui.btn_selected_idle_color
selected_hover_color gui.btn_selected_hover_color
font gui.font_face_bold
size 36
align(1.0, .5)
xoffset -55
kerning 1.5
Code: Select all
################################################################################
# Save and Load menu
################################################################################
### Save/Load slots ############################################################
screen file_picker(title):
text '[title]' pos(269, 127) style 'screen_title'
hbox:
pos(1570, 162)
xalign 0.60
spacing 30
textbutton _('Quick') action FilePage('quick') style 'saveload_nav'
textbutton _('Auto') action FilePage('auto') style 'saveload_nav'
for page in range(1, 16):
textbutton '[page]' action FilePage(page) style 'saveload_nav'
grid 4 2:
pos(137, 302)
xspacing 31
yspacing 20
for i in range(1, 9):
button:
xysize(389, 294)
insensitive_background 'images/gui/saveload_slot_ground.png'
idle_background 'images/gui/saveload_slot_idle.png'
hover_background 'images/gui/saveload_slot_hover.png'
action FileAction(i)
vbox:
spacing 3
pos(33, 35)
add FileScreenshot(i)
vbox:
xalign .5
text FileSlotName(i, 9) + '. ' + FileTime(i, format=_('%H:%M'), empty=(_('No save data.'))) style 'slot_text'
text FileTime(i, format=_('%B %d, %Y'), empty=('')) style 'slot_text'
key 'save_delete' action FileDelete(i)
style saveload_nav_text is saveload_nav
style screen_title:
color gui.btn_hover_color
font gui.font_face_bold
size 38
anchor(.5, .5)
style slot_text:
insensitive_color gui.btn_insensitive_color
idle_color gui.btn_idle_color
hover_color gui.btn_hover_color
selected_idle_color gui.btn_idle_color
selected_hover_color gui.btn_hover_color
font gui.font_face_medium
size 22
xalign .5
style saveload_nav:
idle_color gui.btn_hover_color
hover_color gui.btn_selected_idle_color
selected_idle_color gui.btn_selected_idle_color
selected_hover_color gui.btn_hover_color
font gui.font_face_bold
size 33
### Save screen ################################################################
screen save(fromMain=False):
tag menu
key "game_menu" action Return()
if fromMain:
add 'images/gui/sub_bg.png'
add 'images/gui/saveload_bg.png'
use file_picker(_('Save Game'))
if fromMain == False:
use navigation2
else:
use navigation
### Load screen ################################################################
screen load(fromMain=False):
tag menu
key "game_menu" action Return()
if fromMain:
add 'images/gui/sub_bg.png'
add 'images/gui/saveload_bg.png'
use file_picker(_('Load Game'))
if fromMain == False:
use navigation2
else:
use navigation
-
- Veteran
- Posts: 293
- Joined: Fri Sep 17, 2021 2:09 am
- Organization: enaielei
- Tumblr: enaielei
- Deviantart: enaielei
- Github: enaielei
- Skype: enaielei
- Soundcloud: enaielei
- itch: enaielei
- Discord: enaielei#7487
- Contact:
Re: Missing menu dialogue?
Turn your confirm screen's if statements into if/elif. Then add an else statement and just simply put the message as the label's text.
That might give you an idea on what's supposed to be the message on that empty confirm prompt, since the reason why it's empty is because none of the conditions was met.
That might give you an idea on what's supposed to be the message on that empty confirm prompt, since the reason why it's empty is because none of the conditions was met.
-
- Newbie
- Posts: 23
- Joined: Tue Nov 05, 2019 8:27 pm
- Projects: Slippery Kiss
- Deviantart: dreadfulenchanted
- Contact:
Re: Missing menu dialogue?
It apparently won't allow elif statements, unless I used the wrong syntax. I can create an else statement on its on with the if statements. However, it creates overlapping text in some places.enaielei wrote: ↑Wed Jul 26, 2023 7:22 pm Turn your confirm screen's if statements into if/elif. Then add an else statement and just simply put the message as the label's text.
That might give you an idea on what's supposed to be the message on that empty confirm prompt, since the reason why it's empty is because none of the conditions was met.
Code: Select all
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.
File "game/scripts/screenConfirm.rpy", line 16: 'elif' is not a keyword argument or valid child of the frame statement.
elif message == gui.ARE_YOU_SURE:
^
Ren'Py Version: Ren'Py 8.1.1.23060707
Wed Jul 26 19:24:22 2023
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3809
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: Missing menu dialogue?
Your first option must be an if statement, the rest will be elif
The final should be else to catch all other conditions
Though I'm not sure why you're using if/elif instead of just editing the confirm messages
The final should be else to catch all other conditions
Though I'm not sure why you're using if/elif instead of just editing the confirm messages
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Twitter
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
-
- Newbie
- Posts: 23
- Joined: Tue Nov 05, 2019 8:27 pm
- Projects: Slippery Kiss
- Deviantart: dreadfulenchanted
- Contact:
Re: Missing menu dialogue?
This worked perfect, thank you!
And I didn't code this, the person who did took out all the original renpy code and put in their own. That's why I don't know what's missing.
Anyway, the game worked fine now so there's no issue. Thank you again!
Who is online
Users browsing this forum: No registered users