I'm going bonkers trying to figure this one out for hours. I've basically added some textbuttons in my screen say so that these buttons will appear whenever the dialogue window appears, but when label credits starts, the window for the dialogue is gone but the textbuttons remain on screen.
I would like to know how I can make those textbuttons disappear with the dialogue window since window hide and hide screen say doesn't work.
[Solved] Hiding in-game-buttons when included in screen say
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.
- inahochama
- Regular
- Posts: 39
- Joined: Tue Dec 15, 2009 12:38 am
- Contact:
[Solved] Hiding in-game-buttons when included in screen say
Last edited by inahochama on Mon May 09, 2011 11:22 am, edited 1 time in total.
- PyTom
- Ren'Py Creator
- Posts: 16096
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Re: how to hide screendisplayable buttons under screen say ?
Can you take a screenshot of your game's credits, and also give the code for the credits?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
- inahochama
- Regular
- Posts: 39
- Joined: Tue Dec 15, 2009 12:38 am
- Contact:
Re: how to hide screendisplayable buttons under screen say ?
This is the code for the label start and the label credits.
This is the code for the in-game-menu-buttons in the screen say.
Code: Select all
label start:
scene black
with fade
e "You've created a new Ren'Py game."
e "text"
e "text"
jump credits
label credits:
scene black
with fade
#window hide #(doesn't hide buttons)
#hide screen say #(doesn't hide buttons)
centered "text"
centered "text"
centered "text"
return
Code: Select all
screen say:
# Defaults for side_image and two_window
default side_image = None
default two_window = False
# Decide if we want to use the one-window or two-window varaint.
if not two_window:
# The one window variant.
window:
id "window"
has vbox:
style "say_vbox"
if who:
text who id "who"
text what id "what"
else:
# The two window variant.
vbox:
style "say_two_window_vbox"
if who:
window:
style "say_who_window"
text who:
id "who"
window:
id "window"
has vbox:
style "say_vbox"
text what id "what"
hbox xalign .98 yalign .98:
textbutton "save" action ShowMenu("save")
textbutton "options" action ShowMenu('preferences')
textbutton "skip" action Skip()
Last edited by inahochama on Mon May 09, 2011 11:19 am, edited 2 times in total.
Re: how to hide screendisplayable buttons under screen say ?
hmm try putting this at beginning of your credit label
$ show_button_game_menu = False
i used this to hide default buttons before
$ show_button_game_menu = False
i used this to hide default buttons before
- inahochama
- Regular
- Posts: 39
- Joined: Tue Dec 15, 2009 12:38 am
- Contact:
Re: how to hide screendisplayable buttons under screen say ?
Thanks for the suggestion. Thing is that code only works if I had a show_button_game_menu as True or as an appended overlay but in the case of the code above, I don't. One of the reasons why I had these buttons added in my screen say is so I don't have to do any appending or true/false variables for in-game menu buttons. I was hoping to minimize typing
EDIT:
Turns out creating an "if" statement with showbuttons (or something) variable with the textbuttons in the screen say code, then setting it to "True/False" on the label start and label credits solved the issue. Hahaha, I practically had the answer all along thanks to Machinist's suggestion.
EDIT:
Turns out creating an "if" statement with showbuttons (or something) variable with the textbuttons in the screen say code, then setting it to "True/False" on the label start and label credits solved the issue. Hahaha, I practically had the answer all along thanks to Machinist's suggestion.
Re: [Solved] Hiding in-game-buttons when included in screen
lol no idea how you figured it out but glad my comment helped xD
Who is online
Users browsing this forum: Andredron, Google [Bot]