Main menu generator (ver 1.15)

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.
Message
Author
JQuartz
Eileen-Class Veteran
Posts: 1265
Joined: Fri Aug 31, 2007 7:02 am
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Contact:

Re: Main menu generator (ver 1.8-Completed!)

#31 Post by JQuartz »

Version 1.8:
After realizing how troublesome it was to make a 9 frame animated button (9 frames for unfocused, 9 frames for hovered) and to make it worse I had to make 13 of such buttons (18 frames X 13 buttons=234 frames!), I made the 'Apply Frame Change To All' button to include animation (previously not included). So now I just have to make the changes to the Start button then press the 'Apply Frame Change To All' button and I save myself from making the other 216 frames. Other than that, I've also added 'Start All Over' button so I don't have to keep going back into the main menu in order to clear all the changes.

Version 1.9:
Discovered a bug which affects the newly added function, 'Apply Frame Change To All'. So I fixed it. If you don't use 'Apply Frame Change To All' function, you won't need to upgrade to this version.
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.

Watercolorheart
Eileen-Class Veteran
Posts: 1314
Joined: Mon Sep 19, 2005 2:15 am
Completed: Controlled Chaos / Sum of the Parts / "that" Midna game with ZONEsama
Projects: Sparse Series/Oddments Shop original cartoon in Pevrea; Cybernetic Duels (fighting game); Good Vibin'
Organization: Watercolorheart Studios
IRC Nick: BCS
Tumblr: adminwatercolor
Deviantart: itsmywatercolorheart
Github: Watercolordevdev
Skype: heartnotes
Soundcloud: Watercollider
itch: watercolorheart
Location: Florida
Contact:

Re: Main menu generator (ver 1.8-Completed!)

#32 Post by Watercolorheart »

Uh, what was the change in a way that someone who needs very clear descriptions can understand?
I'm not even the same person anymore

JQuartz
Eileen-Class Veteran
Posts: 1265
Joined: Fri Aug 31, 2007 7:02 am
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Contact:

Re: Main menu generator (ver 1.8-Completed!)

#33 Post by JQuartz »

BCS wrote:Uh, what was the change in a way that someone who needs very clear descriptions can understand?
Well, before Version 1.8, there's this button in the 'Extra Stuff' called 'Apply Frame Changes To All Main Menu Buttons' which will make all buttons to have the same button color as the Start Button so you wouldn't need to make the buttons individually if I want them to have the same frame and hovered frame. But after I tried to make animated buttons, I realized it was extremely tedious to make all the buttons individually so I edited the 'Apply Frame Changes To All Main Menu Buttons' function to include animated buttons as well, which was previously not included. So now I just have to make the Start Button to have animation and then I just have to click 'Apply Frame Changes To All Buttons' and all the main menu buttons will have the same animation. This makes the process of making animated buttons much less tedious.

I then uploaded the version 1.8 but after some more tinkering I realized that the 'Apply Frame Changes To All Main Menu Buttons' function would add the animation of the Start Button to the rest of the main menu buttons instead of replacing it so I made some changes to the code so that it will replace not add and call it version 1.9

Ugh...I'm not good at explaining things...hope you can understand.
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.

JQuartz
Eileen-Class Veteran
Posts: 1265
Joined: Fri Aug 31, 2007 7:02 am
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Contact:

Re: Main menu generator (ver 1.10-Completed!)

#34 Post by JQuartz »

Discovered yet another bug affecting the start button hovered animation. If you create a start button that has animation when hovered over, the generated main menu will not start. Version 1.10 fixes this. Sorry for all the bugs. If anyone's game crashes due to problems in the mainmenu.rpy please post it here. I appreciate it. And if you need help correcting any mainmenu.rpy problem, you can post it here as well. I'll fix it as soon as possible.
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.

JQuartz
Eileen-Class Veteran
Posts: 1265
Joined: Fri Aug 31, 2007 7:02 am
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Contact:

Re: Main menu generator (ver 1.11-Completed!)

#35 Post by JQuartz »

Added a 'Apply Start Button's sound effect to all main menu buttons' function in 'Extra Stuff'. This would set all 12(Continue, Preferences, Quit, + 9 Extra Buttons) buttons with a click of a button. Quite handy.
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.

Dalton
Regular
Posts: 53
Joined: Fri Feb 27, 2009 12:50 pm
Location: Germany
Contact:

Re: Main menu generator (ver 1.11-Completed!)

#36 Post by Dalton »

I used it. Very handy and with some thinking you can even get some quite unique effects.
You are a great help, for people like me who are just beginning to learn about python :lol:
~Imagination is more important than knowledge (Albert Einstein)~

Just working on graphics for the moment... May start talking about my project once they are done...

JQuartz
Eileen-Class Veteran
Posts: 1265
Joined: Fri Aug 31, 2007 7:02 am
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Contact:

Re: Main menu generator (ver 1.11-Completed!)

#37 Post by JQuartz »

Dalton wrote:I used it. Very handy and with some thinking you can even get some quite unique effects.
Thanks. Happy to hear that. :)
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.

Watercolorheart
Eileen-Class Veteran
Posts: 1314
Joined: Mon Sep 19, 2005 2:15 am
Completed: Controlled Chaos / Sum of the Parts / "that" Midna game with ZONEsama
Projects: Sparse Series/Oddments Shop original cartoon in Pevrea; Cybernetic Duels (fighting game); Good Vibin'
Organization: Watercolorheart Studios
IRC Nick: BCS
Tumblr: adminwatercolor
Deviantart: itsmywatercolorheart
Github: Watercolordevdev
Skype: heartnotes
Soundcloud: Watercollider
itch: watercolorheart
Location: Florida
Contact:

Re: Main menu generator (ver 1.11-Completed!)

#38 Post by Watercolorheart »

I have two generated buttons for the Gallery and Music Room, but they're not showing up when I use your Main Menu generator. Can you help me?
I'm not even the same person anymore

JQuartz
Eileen-Class Veteran
Posts: 1265
Joined: Fri Aug 31, 2007 7:02 am
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Contact:

Re: Main menu generator (ver 1.11-Completed!)

#39 Post by JQuartz »

Try repositioning the buttons(move them upwards since they should be positioned at just beyond the bottom right). And set destination for the extra buttons as well.
Hmm...Maybe this is a sign that I should make adjustments to the default location of the extra buttons.
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.

Watercolorheart
Eileen-Class Veteran
Posts: 1314
Joined: Mon Sep 19, 2005 2:15 am
Completed: Controlled Chaos / Sum of the Parts / "that" Midna game with ZONEsama
Projects: Sparse Series/Oddments Shop original cartoon in Pevrea; Cybernetic Duels (fighting game); Good Vibin'
Organization: Watercolorheart Studios
IRC Nick: BCS
Tumblr: adminwatercolor
Deviantart: itsmywatercolorheart
Github: Watercolordevdev
Skype: heartnotes
Soundcloud: Watercollider
itch: watercolorheart
Location: Florida
Contact:

Re: Main menu generator (ver 1.11-Completed!)

#40 Post by Watercolorheart »

Nevermind, I did it with vanilla image-map code...
I'm not even the same person anymore

JQuartz
Eileen-Class Veteran
Posts: 1265
Joined: Fri Aug 31, 2007 7:02 am
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Contact:

Re: Main menu generator (ver 1.11-Completed!)

#41 Post by JQuartz »

BCS wrote: Nevermind, I did it with vanilla image-map code...
Heh, heh, heh. Good. I don't need to add another feature then (it's kind of hard, got stuck already).
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.

JQuartz
Eileen-Class Veteran
Posts: 1265
Joined: Fri Aug 31, 2007 7:02 am
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Contact:

Re: Main menu generator (ver 1.12-Completed!)

#42 Post by JQuartz »

Version 1.12:
1)Added a 'Center' position in the reposition menu so I could make the Menu Buttons positions be perfectly centered. Also useful when I can't find my button after a over-vigorous round of repositioning.
2)Added a 'Apply Start Button's Font Type and Size To All Main Menu Buttons' and a 'Apply Start Button's Font Color To All Main Menu Buttons' which would be quite useful when I need to make 13 buttons with the same font color, type and size.
3)Modified the initial position of the Extra Buttons so that it will be placed at the center when they are added (only if they're not in a ui.frame). Previously Extra Buttons are placed outside the screen and that makes it troublesome to find it.
4)The same goes for the initial position of the foreground image.
5)Modified the menu buttons so that after I changed the buttons' text, the text in the 'Edit Extra Button' changes accordingly. This helps when I created 9 extra buttons, changed their text and can't remember which one is button1 and so forth.
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.

Shirou
Newbie
Posts: 6
Joined: Mon Mar 30, 2009 4:35 pm
Location: Germany
Contact:

Re: Main menu generator (ver 1.12-Completed!)

#43 Post by Shirou »

Hi there!

First I want to thank you for making this!
It helped me so much!! :D

And then I've got a question or perhaps a bug(?).
So, I created some buttons using images. So far, so good.
But when I click on the preferences-button I always end up being on the load-screen. :(
So I wanted to edit my menu, since I put a lot of time into it (positioning and making buttons to use in and so on), but I cant figure out how.
Do I have to re-do the whole thing, because I forgot to type the destination to some of the extra-buttons?
(Might as well add some later on, so it would be really helpful if there was a way to edit it after you generated the thing... :wink:)
And is it really a bug or am I being stupid with the preferences-thingy? XD"

Please help!

PS: please excuse the errors if any, I'm german XD"

JQuartz
Eileen-Class Veteran
Posts: 1265
Joined: Fri Aug 31, 2007 7:02 am
Projects: 0 completed game. Still haven't made any meaningfully completed games...
Contact:

Re: Main menu generator (ver 1.12-Completed!)

#44 Post by JQuartz »

Shirou wrote:But when I click on the preferences-button I always end up being on the load-screen. :(
Yeah, it's a bug. You can either fix the destination in mainmenu.rpy or you'll have to download the newer version(1.13). To fix it yourself, you'll need to change the destination of the preference button from load_screen to preference_screen like so

Code: Select all

    $ ui.imagebutton('Preference.png','Preference_hovered.png',clicked=_intra_jumps('preferences_screen', 'main_game_transition'), xpos=0,ypos=0,xminimum=156,yminimum=10,hover_sound='None', activate_sound='None' )
Shirou wrote:So I wanted to edit my menu, since I put a lot of time into it (positioning and making buttons to use in and so on), but I cant figure out how.
Save it the same way you save in a game(ie. right-click and go to the save screen)
Shirou wrote:Do I have to re-do the whole thing, because I forgot to type the destination to some of the extra-buttons?
If you did save, you can load it but if you didn't, you have to enter the destination of the extra-buttons manually via Scite or JEdit or whatever you're using to edit the rpy. If you don't know how, change the destination like so:
This is for imagebuttons:

Code: Select all

    $ ui.imagebutton('button1.bmp','button1_hovered.bmp',clicked=_intra_jumps('load_screen', 'main_game_transition'), xpos=0,ypos=0,xminimum=116,yminimum=10,hover_sound='None', activate_sound='None' )
to

Code: Select all

    $ ui.imagebutton('button1.bmp','button1_hovered.bmp',clicked=ui.jumpsoutofcontext('start'), xpos=0,ypos=0,xminimum=116,yminimum=10,hover_sound='None', activate_sound='None' )   #You got to change _intra_jumps to jumpsoutofcontext and then change start to whatever destination you want
This is for textbuttons:

Code: Select all

$ ui.button(clicked=ui.jumpsoutofcontext('start'), background='#003c78',hover_background='#0050a0', xpos=0,ypos=0,xminimum=116,yminimum=10,hover_sound='None', activate_sound='None' )
    $ ui.text('Button2',hover_color='#c8ffff',color='#c8ffff',size=22,font='DejaVuSans.ttf' ) #Change start to whatever destination you want
Anyway, if you find it too troublesome to fix it then just post your mainmenu.rpy and I'll put the destination(including the preference one) for you. Just remember to state the destinations of the extra buttons( according to sequence. eg. button1's then button2's, etc...).
Shirou wrote:(Might as well add some later on, so it would be really helpful if there was a way to edit it after you generated the thing... :wink:)
You'll need to save it via the save screen(just like you're saving in your game)
Shirou wrote:And is it really a bug or am I being stupid with the preferences-thingy? XD"
It's a bug. There are probably more bugs since I didn't beta test this thing. Anyway, you should also try using main menu imagemap layout here:http://www.renpy.org/wiki/renpy/doc/ref ... _main_menu since I believe it's easier to use and less buggy.
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.

sharakael
Newbie
Posts: 4
Joined: Mon Jan 25, 2010 12:21 pm
Contact:

Re: Main menu generator (ver 1.13-Completed!)

#45 Post by sharakael »

Thank you very much for this! Trying to make my own VN for the first time, and I had a hard time trying to understand the Cookbook on how to customise my Main Menu... this saved me a lot of time :D

One question though... does it delete the pre-set themes that came with renpy itself? I tried to create a new project, and when it came to the part where I (usually) get to choose colour themes, there was only 1 option, the base dark blue... was just wondering where the rest of the colour themes disappeared to... :wink:

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], CalixtheGreat