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.
saguaro
Miko-Class Veteran
Posts: 560 Joined: Sun Feb 12, 2012 9:17 am
Completed: Locked-In, Sunrise, The Censor
Organization: Lucky Special Games
itch: saguarofoo
Location: USA
Contact:
#1
Post
by saguaro » Sun Jul 05, 2015 9:22 am
When toggling languages the navigation bar on my preference screen disappears. "menu_bg_screen" that is part of the navigation screen remains, but the nav bar itself vanishes. I am a bit rusty so I may be missing something obvious. Screenshot 1 before, 2 after.
Code: Select all
screen preferences():
tag menu
use navigation
...
vbox:
frame:
has vbox
label _("Language")
textbutton "English" action Language(None)
textbutton "Deutsch" action Language("german")
Code: Select all
screen navigation():
frame:
style_group "mmenu"
at drop_down(2.0)
hbox:
spacing 75
null width 50
if not renpy.get_screen("main_menu"):
textbutton _("Return") action Return()
else:
textbutton _("Start") action Start() xysize(112, 28)
if main_menu:
textbutton _("Scenes") action [If(renpy.get_screen("scenes"), NullAction(), ShowMenu("scenes")), SelectedIf(renpy.get_screen("scenes"))]
textbutton _("Options") action [If(renpy.get_screen("preferences"), NullAction(), ShowMenu("preferences")), SelectedIf(renpy.get_screen("preferences"))]
if not main_menu:
textbutton _("Save") action [If(renpy.get_screen("save"), NullAction(), ShowMenu("save")), SelectedIf(renpy.get_screen("save"))]
textbutton _("Load") action [If(renpy.get_screen("load"), NullAction(), ShowMenu("load")), SelectedIf(renpy.get_screen("load"))]
if not main_menu:
textbutton _("Main") action MainMenu()
textbutton _("Quit") action Quit(confirm=True)
else:
textbutton _("Quit") action Quit(confirm=False)
null width 50
on "show" action Show("menu_bg_screen")
Attachments
Last edited by
saguaro on Mon Jul 06, 2015 2:48 pm, 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:
#2
Post
by PyTom » Sun Jul 05, 2015 11:39 am
Can you shift+I style-inspect where it should be, to see if it's there and just hidden?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama •
https://www.patreon.com/renpytom
saguaro
Miko-Class Veteran
Posts: 560 Joined: Sun Feb 12, 2012 9:17 am
Completed: Locked-In, Sunrise, The Censor
Organization: Lucky Special Games
itch: saguarofoo
Location: USA
Contact:
#3
Post
by saguaro » Sun Jul 05, 2015 12:01 pm
It appears to be gone, I cannot locate it.
saguaro
Miko-Class Veteran
Posts: 560 Joined: Sun Feb 12, 2012 9:17 am
Completed: Locked-In, Sunrise, The Censor
Organization: Lucky Special Games
itch: saguarofoo
Location: USA
Contact:
#4
Post
by saguaro » Mon Jul 06, 2015 2:47 pm
Well, the workaround on this is kinda obvious I guess... simply have the button show the navigation screen. Should I make a replication for this?
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:
#5
Post
by PyTom » Mon Jul 06, 2015 4:16 pm
Yes please.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama •
https://www.patreon.com/renpytom
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:
#6
Post
by PyTom » Wed Jul 08, 2015 10:08 pm
So, it turns out the problem was code of the form:
Code: Select all
transform drop_down(e):
yalign -0.1
on show:
easein e yalign 0.1
on hide:
linear 0.5 alpha 0.0
on replace:
yalign 0.1 alpha 1.0
on replaced:
yalign 0.1 alpha 1.0
The problem turned out to be that there are rare cases where a screen can show up without being shown. These include when the screen is first shown, and when the screen is recompiled after a style or language change. When that happens, the screen stays at yalign -0.1 and hence off the screen. I've added a new ATL event - update - to 6.99.5 to account for this case.
Until then (or even forever) you can work around this with code like:
Code: Select all
transform drop_down(e):
yalign 0.1 alpha 1.0
on show:
yalign -0.1
easein e yalign 0.1
on hide:
linear 0.5 alpha 0.0
Basically, don't do the show behavior unless you see the show event.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama •
https://www.patreon.com/renpytom
saguaro
Miko-Class Veteran
Posts: 560 Joined: Sun Feb 12, 2012 9:17 am
Completed: Locked-In, Sunrise, The Censor
Organization: Lucky Special Games
itch: saguarofoo
Location: USA
Contact:
#7
Post
by saguaro » Fri Jul 10, 2015 2:39 pm
Thank you very much!
Users browsing this forum: Bing [Bot] , Google [Bot]