So I'm having a bit of an issue with regards to menu editing. I imagine the button positioning issue may be solved once I add my own personal buttons in (waiting on my illustrator), but for now I see now way of moving the custom gui buttons on the main menu to be more center screen.
I am also having some issues with setting the click sound for the buttons.
I try the line (style.button.activate_sound = "main_menu_click.ogg") in options.py, but get no results.
I am using the new GUI interface for all of this.
Most guides I have found on these topics are fairly outdated.
Editting MM button positions and click sound
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: 4
- Joined: Wed May 31, 2017 9:21 am
- Contact:
- Scribbles
- Miko-Class Veteran
- Posts: 636
- Joined: Wed Sep 21, 2016 4:15 pm
- Completed: Pinewood Island, As We Know It
- Projects: In Blood
- Organization: Jaime Scribbles Games
- Deviantart: breakfastdoodles
- itch: scribbles
- Location: Ohio
- Contact:
Re: Editting MM button positions and click sound
you could try xpos and ypos to move the button where you want it? I'm not sure about the sound issues you're having though.
-
- Newbie
- Posts: 4
- Joined: Wed May 31, 2017 9:21 am
- Contact:
Re: Editting MM button positions and click sound
I figured I could use that once I actually put in my own buttons, but for now I can't seem to get that to happen with the built in new gui menu buttons, and to be fair my understanding of those is fairly lacking.Scribbles wrote:you could try xpos and ypos to move the button where you want it? I'm not sure about the sound issues you're having though.
This is what I have for the main menu code in the screens.py
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
## The use statement includes another screen inside this one. The actual
## contents of the main menu are in the navigation screen.
use navigation
if gui.show_name:
vbox:
text "[config.name!t]":
style "main_menu_title"
text "[config.version]":
style "main_menu_version"
style main_menu_frame is empty
style main_menu_vbox is vbox
style main_menu_text is gui_text
style main_menu_title is main_menu_text
style main_menu_version is main_menu_text
style main_menu_frame:
xsize 420
yfill True
background "gui/overlay/main_menu.png"
style main_menu_vbox: #CHANGING xalign AND yalign HERE DOES NOTHING
xalign 1.0
xoffset -30
xmaximum 1200
yalign 1.0
yoffset -30
style main_menu_text:
properties gui.text_properties("main_menu", accent=True)
style main_menu_title:
properties gui.text_properties("title")
style main_menu_version:
properties gui.text_properties("version")
- Scribbles
- Miko-Class Veteran
- Posts: 636
- Joined: Wed Sep 21, 2016 4:15 pm
- Completed: Pinewood Island, As We Know It
- Projects: In Blood
- Organization: Jaime Scribbles Games
- Deviantart: breakfastdoodles
- itch: scribbles
- Location: Ohio
- Contact:
Re: Editting MM button positions and click sound
ETA: I just realized doing this will change where the nav screen is in the whole game! you may want to get rid of the "use navigation" line and then manually add text buttons where you want them instead in the main menu! sorry > <
oh, those text buttons are in the navigation screen code, the main menu just adds them to itself (it says use navigation). If you change the xpos and ypos of the text buttons there, and remove the side frame it can work (I'm sorry I'm not super knowledgeable about code)
Then you'll just need to remove the side frame while may just taking some playing around in the nav screen
oh, those text buttons are in the navigation screen code, the main menu just adds them to itself (it says use navigation). If you change the xpos and ypos of the text buttons there, and remove the side frame it can work (I'm sorry I'm not super knowledgeable about code)
Code: Select all
screen navigation():
vbox:
style_prefix "navigation"
xpos gui.navigation_xpos #### OR change the pos here maybe?
yalign 0.5
spacing gui.navigation_spacing
###### xpos and ypos after these text buttons should change what you're wanting them too ##################
if main_menu:
textbutton _("Start") action Start()
else:
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)
-
- Newbie
- Posts: 4
- Joined: Wed May 31, 2017 9:21 am
- Contact:
Re: Editting MM button positions and click sound
Ah, thank you very much. That worked for me. I should have looked over the screens.py a bit more, but I'm still fairly new to it all.
Now I just need a way to add the clicking sound in.
Now I just need a way to add the clicking sound in.
Who is online
Users browsing this forum: Ocelot