Buttons on top [FIXED]
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.
- leviathanimation
- Regular
- Posts: 49
- Joined: Wed Nov 15, 2017 9:33 pm
- Completed: Tyrania visual novel
- Projects: Making multiple animations
- Deviantart: leviathanimation
- itch: leviathanimation
- Location: Canada
- Contact:
Buttons on top [FIXED]
I changed the navigation screen section to have custom buttons in the main menu. The problem is now when I click on the load button in the main menu, the load screen appears but all the buttons of the main menu are on top of it. Help how do i fix that?
Last edited by leviathanimation on Sat Mar 21, 2020 12:47 pm, edited 1 time in total.
- Per K Grok
- Miko-Class Veteran
- Posts: 882
- Joined: Fri May 18, 2018 1:02 am
- Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
- itch: per-k-grok
- Location: Sverige
- Contact:
Re: Buttons on top
Screen navigation is use by both the Main Menu and the other Game Menu screens, which I assume you already know.leviathanimation wrote: ↑Fri Mar 20, 2020 11:07 pm I changed the navigation screen section to have custom buttons in the main menu. The problem is now when I click on the load button in the main menu, the load screen appears but all the buttons of the main menu are on top of it. Help how do i fix that?
In my experience when you try to customize stuff in the navigation screen just for the main menu, things tend to spill over to the other Game Menu screens for reasons that are not apparent.
The simplest way to handle this, in my opinion, is to make a special navigation screen just for the Main Menu.
- leviathanimation
- Regular
- Posts: 49
- Joined: Wed Nov 15, 2017 9:33 pm
- Completed: Tyrania visual novel
- Projects: Making multiple animations
- Deviantart: leviathanimation
- itch: leviathanimation
- Location: Canada
- Contact:
Re: Buttons on top
I'm still new to coding, so I feel like if I try to create a new navigation screen, things will be worst Is there really not a way to just play with the layers of the imagebutton? Like put it at bottom layer or something like that..?
Per K Grok wrote: ↑Sat Mar 21, 2020 6:48 amScreen navigation is use by both the Main Menu and the other Game Menu screens, which I assume you already know.leviathanimation wrote: ↑Fri Mar 20, 2020 11:07 pm I changed the navigation screen section to have custom buttons in the main menu. The problem is now when I click on the load button in the main menu, the load screen appears but all the buttons of the main menu are on top of it. Help how do i fix that?
In my experience when you try to customize stuff in the navigation screen just for the main menu, things tend to spill over to the other Game Menu screens for reasons that are not apparent.
The simplest way to handle this, in my opinion, is to make a special navigation screen just for the Main Menu.
Re: Buttons on top
Apply these changes. In such way you have a navigation for main menu and one for other screens.
NAVIGATION:
Now, in your main menu, delete the 'use navigation' line and insert your buttons. Here I used text buttons, you can do whatever.
NAVIGATION:
Code: Select all
## Navigation screen ###########################################################
screen navigation():
vbox:
style_prefix "navigation"
xpos gui.navigation_xpos
yalign 0.5
spacing gui.navigation_spacing
textbutton _("History") action ShowMenu("history")
textbutton _("Save") action ShowMenu("save")
textbutton _("Load") action ShowMenu("load")
textbutton _("Preferences") action ShowMenu("preferences")
if _in_replay:
textbutton _("End Replay") action EndReplay(confirm=True)
elif not main_menu:
textbutton _("Main Menu") action MainMenu()
textbutton _("About") action ShowMenu("about")
if renpy.variant("pc"):
## Help isn't necessary or relevant to mobile devices.
textbutton _("Help") action ShowMenu("help")
## The quit button is banned on iOS and unnecessary on Android.
textbutton _("Quit") action Quit(confirm=not main_menu)
Code: Select all
screen main_menu():
## This ensures that any other menu screen is replaced.
tag menu
style_prefix "main_menu"
add gui.main_menu_background
## This empty frame darkens the main menu.
frame:
pass
vbox:
style_prefix "navigation"
textbutton "START" action Start()
textbutton "LOAD" action ShowMenu("load")
textbutton "PREFS" action ShowMenu("preferences")
textbutton "QUIT" action Quit(confirm = False)
If you want to debate on a reply I gave to your posts, please QUOTE ME or i'll not be notified about. << now red so probably you'll see it.
10 ? "RENPY"
20 GOTO 10
RUN
10 ? "RENPY"
20 GOTO 10
RUN
- leviathanimation
- Regular
- Posts: 49
- Joined: Wed Nov 15, 2017 9:33 pm
- Completed: Tyrania visual novel
- Projects: Making multiple animations
- Deviantart: leviathanimation
- itch: leviathanimation
- Location: Canada
- Contact:
Re: Buttons on top
OMG Thank you so much!
gas wrote: ↑Sat Mar 21, 2020 11:25 am Apply these changes. In such way you have a navigation for main menu and one for other screens.
NAVIGATION:Now, in your main menu, delete the 'use navigation' line and insert your buttons. Here I used text buttons, you can do whatever.Code: Select all
## Navigation screen ########################################################### screen navigation(): vbox: style_prefix "navigation" xpos gui.navigation_xpos yalign 0.5 spacing gui.navigation_spacing textbutton _("History") action ShowMenu("history") textbutton _("Save") action ShowMenu("save") textbutton _("Load") action ShowMenu("load") textbutton _("Preferences") action ShowMenu("preferences") if _in_replay: textbutton _("End Replay") action EndReplay(confirm=True) elif not main_menu: textbutton _("Main Menu") action MainMenu() textbutton _("About") action ShowMenu("about") if renpy.variant("pc"): ## Help isn't necessary or relevant to mobile devices. textbutton _("Help") action ShowMenu("help") ## The quit button is banned on iOS and unnecessary on Android. textbutton _("Quit") action Quit(confirm=not main_menu)
Code: Select all
screen main_menu(): ## This ensures that any other menu screen is replaced. tag menu style_prefix "main_menu" add gui.main_menu_background ## This empty frame darkens the main menu. frame: pass vbox: style_prefix "navigation" textbutton "START" action Start() textbutton "LOAD" action ShowMenu("load") textbutton "PREFS" action ShowMenu("preferences") textbutton "QUIT" action Quit(confirm = False)
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot], Majestic-12 [Bot]