adding imagebutton to Main Menu
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: 8
- Joined: Sun Jun 24, 2018 4:06 am
- Contact:
adding imagebutton to Main Menu
I give up. I've tried every piece of code I've found online to add an imagebutton to the Main Menu of my game and nothing seems to work. Please, help?
-
- Miko-Class Veteran
- Posts: 793
- Joined: Fri Feb 09, 2018 12:05 am
- Location: Canada
- Contact:
Re: adding imagebutton to Main Menu
can you please add your code that you were trying to use
try something like this
the number are where you want the button to appear at
Your_folder is where you have put the images into
and ShowMenu("Your_Gallery_Page") is where you want to go to or you can use this also click("Your_Gallery_Page")
try something like this
the number are where you want the button to appear at
Your_folder is where you have put the images into
and ShowMenu("Your_Gallery_Page") is where you want to go to or you can use this also click("Your_Gallery_Page")
Code: Select all
imagebutton idle im.Scale("Your_folder/1.png", 129, 250) hover im.Scale("Your_folder/1b.png", 129, 250) action ShowMenu("Your_Gallery_Page")
-
- Newbie
- Posts: 8
- Joined: Sun Jun 24, 2018 4:06 am
- Contact:
Re: adding imagebutton to Main Menu
Thank you man.
Essentially I need an imagebutton under the regular navigation textbuttons. I'm not sure where to place it in the screens.
So esentially, I go to screens and I write at the end of the navigation screen part:
Which only gives me an error.
Essentially I need an imagebutton under the regular navigation textbuttons. I'm not sure where to place it in the screens.
So esentially, I go to screens and I write at the end of the navigation screen part:
Code: Select all
screen navigation():
vbox:
style_prefix "navigation"
xpos gui.navigation_xpos
yalign 0.5
spacing gui.navigation_spacing
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)
vbox xalign 0.5 yalign 0.5:
imagebutton auto ("gui/button/thingie.png") action OpenURL("http://whatever.com")
-
- Miko-Class Veteran
- Posts: 793
- Joined: Fri Feb 09, 2018 12:05 am
- Location: Canada
- Contact:
Re: adding imagebutton to Main Menu
try this
I have tried it and it works
Code: Select all
imagebutton xalign 0.5 yalign 0.5:
idle ("gui/button/thingie.png")
action OpenURL("http://whatever.com")
-
- Newbie
- Posts: 8
- Joined: Sun Jun 24, 2018 4:06 am
- Contact:
Re: adding imagebutton to Main Menu
Oh.
Oh!
So it was that easy!
Can't thank you enough, man. A thousand thanks.
Oh!
So it was that easy!
Can't thank you enough, man. A thousand thanks.
Who is online
Users browsing this forum: Google [Bot]