[SOLVED] Changing Main Menu Buttons
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: 20
- Joined: Sat Dec 03, 2011 6:26 pm
- Projects: My Fair Prince (Working Title)
- Contact:
[SOLVED] Changing Main Menu Buttons
(I apologize for my noobiness in advance, considering this would be my first VN I ever made @o@;; I'm trying to search up solutions but I'm not quite sure what I'm finding is what I'm looking for...as you can tell I'm not very good at understanding programming either xD; .)
How do you change the default main menu buttons? Like, how would you be able to take out the whole blue button menu that's given to you by default and replace it with your own button images? Also, how would you position it? Do these things go in the options.rpy or screens.rpy?
How do you change the default main menu buttons? Like, how would you be able to take out the whole blue button menu that's given to you by default and replace it with your own button images? Also, how would you position it? Do these things go in the options.rpy or screens.rpy?
Last edited by Aishra on Sun Feb 19, 2012 2:15 pm, edited 2 times in total.
- Nuxill
- Veteran
- Posts: 464
- Joined: Sat Sep 25, 2010 4:50 pm
- Projects: No Friend
- Tumblr: nuxill
- itch: nuxill
- Contact:
Re: Needing quick assistance as soon as possible! D:
I don't know if you've seen this but it should help you with all of your menu related needs.
-
- Newbie
- Posts: 20
- Joined: Sat Dec 03, 2011 6:26 pm
- Projects: My Fair Prince (Working Title)
- Contact:
Re: Needing quick assistance as soon as possible! D:
I have, but I still don't quite understand it...so if I want to change my default, I just set up an image map? What if I wanted the text to glow when you hovered over it though? I make a duplicate image but with glowing text? I think I mostly just need clarification xDDNuxill wrote:I don't know if you've seen this but it should help you with all of your menu related needs.
edit:
I don't know what I'm doing wrong. It says invalid syntax with 'imagemap:' with a red arrow pointing towards it. D:
Code: Select all
imagemap:
ground 'menunull.png'
hover 'menuhover.png'
hotspot (504, 356, 136, 26)action Start()
hotspot (505, 400, 138, 30) action ShowMenu('load')
hotspot (495, 446, 155, 33) action ShowMenu('preferences')
hotspot (636, 472, 540, 353) action Help()
hotspot (503, 497, 139, 31) action Quit(confirm=False)
- Nuxill
- Veteran
- Posts: 464
- Joined: Sat Sep 25, 2010 4:50 pm
- Projects: No Friend
- Tumblr: nuxill
- itch: nuxill
- Contact:
Re: Needing quick assistance as soon as possible! D:
I'm pretty sure that's what you would do if you wanted that kind of thing. I haven't tried working with image maps yet so I might not be 100% accurate with my knowledge.Aishra wrote:I have, but I still don't quite understand it...so if I want to change my default, I just set up an image map? What if I wanted the text to glow when you hovered over it though? I make a duplicate image but with glowing text? I think I mostly just need clarification xDDNuxill wrote:I don't know if you've seen this but it should help you with all of your menu related needs.
As for the code I'm not sure but you might need something for idle, selected_idle, and selected_hover images which you could just copy and paste what you have now. Something like this:
Code: Select all
imagemap:
ground "menunull.png"
idle "menunull.png"
hover "menuhover.png"
selected_idle "menunull.png"
selected_hover "menuhover.png"
You might need the extra parts just for the main menu.
Also do you have
Code: Select all
window:
style "gm_root"
-
- Miko-Class Veteran
- Posts: 832
- Joined: Mon Nov 01, 2010 9:10 pm
- Contact:
Re: How to change the default main menu buttons? >.<
^ Selected idle and selected hover are unessisary since it's the main menu. Just have ground, idle, and hover images.
Ill edit this post with my imagemap code (currently typing from my phone )
EDIT:
You indented the hotspots wrong. It should be at level with your images.
Ill edit this post with my imagemap code (currently typing from my phone )
EDIT:
Code: Select all
imagemap:
ground "mainmenu_idle.png"
hover "mainmenu_hover.png"
hotspot (585,278,54,22) action Start()
hotspot (100,155,94,22) action ShowMenu("load")
hotspot (100,107,78,22) action ShowMenu("preferences")
hotspot (100,200,78,22) action ShowMenu("extras")
hotspot (83,490,118,22) action Quit(confirm=False)
I have moved to a new account. Please contact me here from now on. T/Y~
-
- Newbie
- Posts: 20
- Joined: Sat Dec 03, 2011 6:26 pm
- Projects: My Fair Prince (Working Title)
- Contact:
Re: How to change the default main menu buttons? >.<
Alright. Here's my code now:
However now it says that parsing the script failed. On the error screen it says:
Code: Select all
window:
style "gm_root"
imagemap:
ground 'menunull.png'
hover 'menuhover.png'
hotspot (504, 356, 136, 26)action Start()
hotspot (505, 400, 138, 30) action ShowMenu('load')
hotspot (495, 446, 155, 33) action ShowMenu('preferences')
hotspot (503, 497, 139, 31) action Quit(confirm=False)
Code: Select all
File "game/options.rpy", line 267: expected statement.
window->:
File "game/options.rpy", line 269: expected statement.
imagemap->:
Last edited by Aishra on Fri Feb 17, 2012 9:22 pm, edited 1 time in total.
-
- Miko-Class Veteran
- Posts: 832
- Joined: Mon Nov 01, 2010 9:10 pm
- Contact:
Re: How to change the default main menu buttons? >.<
Get rid of the window since you're using an magemap, and add 4 spaces behind imagemap
I have moved to a new account. Please contact me here from now on. T/Y~
-
- Newbie
- Posts: 20
- Joined: Sat Dec 03, 2011 6:26 pm
- Projects: My Fair Prince (Working Title)
- Contact:
Re: How to change the default main menu buttons? >.<
Did that just now. Code remains the same except with the window part deleted. And the imagemap part is indented 4 spaces of course. Unfortunately now, it says:
Code: Select all
File "game/options.rpy", line 267: invalid syntax"
imagemap:<-
-
- Miko-Class Veteran
- Posts: 832
- Joined: Mon Nov 01, 2010 9:10 pm
- Contact:
Re: How to change the default main menu buttons? >.<
Mind if you send me a copy of your screens.rpy?
I have moved to a new account. Please contact me here from now on. T/Y~
-
- Newbie
- Posts: 20
- Joined: Sat Dec 03, 2011 6:26 pm
- Projects: My Fair Prince (Working Title)
- Contact:
Re: How to change the default main menu buttons? >.<
Oh geez. How stupid am I...I had the code in options.rpy. >___<;;; Put it in screens.rpy and now the code itself is working! Thanks xD;;
More problems though...when I hover over the image, it doesn't change as I want it to...it just remains static.
More problems though...when I hover over the image, it doesn't change as I want it to...it just remains static.
-
- Miko-Class Veteran
- Posts: 832
- Joined: Mon Nov 01, 2010 9:10 pm
- Contact:
Re: How to change the default main menu buttons? >.<
Odd, should have worked. Could you attach your menuhover?
I have moved to a new account. Please contact me here from now on. T/Y~
-
- Newbie
- Posts: 20
- Joined: Sat Dec 03, 2011 6:26 pm
- Projects: My Fair Prince (Working Title)
- Contact:
Re: How to change the default main menu buttons? >.<
Here is the idle version and the hover version. Technically the idle version doesn't work either, since I have to put the idle image on the game background in order for it to even appear.
-
- Miko-Class Veteran
- Posts: 832
- Joined: Mon Nov 01, 2010 9:10 pm
- Contact:
Re: How to change the default main menu buttons? >.<
I just tested the menu out using your coordinates and images, and it should have worked.
Did you erase
If not, do so because I recreated your wrror wqhen I left that in tact.
Did you erase
Code: Select all
window:
style "gm_root"
I have moved to a new account. Please contact me here from now on. T/Y~
-
- Newbie
- Posts: 20
- Joined: Sat Dec 03, 2011 6:26 pm
- Projects: My Fair Prince (Working Title)
- Contact:
Re: How to change the default main menu buttons? >.<
Hmm. I did that, it's still not working. Is it something about setting the background image on options.rpy to the idle image? Or does that not matter?
-
- Miko-Class Veteran
- Posts: 832
- Joined: Mon Nov 01, 2010 9:10 pm
- Contact:
Re: How to change the default main menu buttons? >.<
Add these two files into your directory and tell me if it works. (You might have to recustomize your GUI if you've messed around with anything else besides the MM)
- Attachments
-
- options.rpy
- (8.36 KiB) Downloaded 120 times
-
- screens.rpy
- screens file
- (14.41 KiB) Downloaded 115 times
I have moved to a new account. Please contact me here from now on. T/Y~
Who is online
Users browsing this forum: Bing [Bot], Google [Bot]