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
User avatar
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:

Main menu generator (ver 1.15)

#1 Post by JQuartz » Mon Dec 24, 2007 6:23 pm

###############################################################################
Take note that this was started before layout was made. I feel this is not as easy to use as layouts so have a look at layouts first:http://www.renpy.org/wiki/renpy/doc/ref ... _main_menu
###############################################################################

Caution:
Just because something can't be done with the main menu generator doesn't mean it can't be done using codes you write yourself.

How to use:
(I haven't tried out with the older versions but it runs in renpy 6.4, 6.5, 6.8.0, 6.8.1 just fine.)

(If you want to load a saved main menu then just load it like normal, it should be compatible with the new generator, at least 1.5 and above should. Not so sure about the others though. )
1. Download the file into any of your project( that had not had its main menu edited)'s folder (just to be safe you better make backup your project). If you have the earlier version of main menu generator, delete it (both rpy and rpyc)
2. Run your project.
3. On the main menu a new button would have appeared. Click on it.
4. Make your main menu.
5. Save the main menu just in case you want to edit it later.
6. Generate the mainmenu.rpy file (it'll overwrite any file in the same directory with the same name).
7. Quit and run the game again and your new main menu will have replaced the normal one.
8. Delete JQuartz_Editor(FINAL).rpy and rpyc since you no longer need it (unless you still want to make more main menus, make sure you don't put it in your distro cause it's useless and eats up space)
9.If you no longer want the main menu generated, just delete mainmenu.rpy and mainmenu.rpyc
10. If you want a create a new main menu without deleting/moving mainmenu.rpy and rpyc, just load the save file of the main menu created before this then click on 'Start All Over' button in Extra Stuff and just edit from there. You shouldn't generate the main menu though unless you want to replace the old mainmenu.rpy
Attachments
JQuartz_Editor(1.15-FINAL).rpy
Fixed a bug concerning the location of buttons when its in a frame.
(397.09 KiB) Downloaded 815 times
JQuartz_Editor(1.13-FINAL).rpy
Fixed some bugs concerning the destination of preference button and extra buttons.
(477.45 KiB) Downloaded 312 times
JQuartz_Editor(1.12-FINAL).rpy
Added a 'Center' button when repositioning. Modified the initial location of a new extra button to be at the center(so you can see it). Added 'Apply Start Button's Font(size, type and color) to all main menu buttons'.
(477.02 KiB) Downloaded 203 times
JQuartz_Editor(1.11-FINAL).rpy
Added a 'Apply Start Button's sound effect to all main menu buttons' function in 'Extra Stuff'
(464.34 KiB) Downloaded 189 times
untitled.JPG
An example of a main menu created using the generator. Though you can't see it but the start button will change color every .25 sec. (The pictures are not included)
untitled.JPG
Another example of a main menu created using the generator.
New Bitmap Image2.JPG
The functions available. Quite a lot aren't they?
New Bitmap Image.JPG
The buttons that can be edited. A total of 9 extra buttons can also be added
Last edited by JQuartz on Fri Mar 19, 2010 12:48 am, edited 47 times in total.
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.

User avatar
PyTom
Ren'Py Creator
Posts: 15481
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: UI enabled main menu generator

#2 Post by PyTom » Thu Dec 27, 2007 3:24 pm

I just tried it out. It's pretty nice in terms of functionality.

There's still some things that need to be done:

- The ability to edit the font and font colors of a button.
- The ability to define new buttons.
- The code itself is ugly, with every variable prefixed with "JQuartz_mainmenu_"

At some point, however, we may want to include this in the Ren'Py distribution.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
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: UI enabled main menu generator

#3 Post by JQuartz » Thu Dec 27, 2007 8:25 pm

PyTom wrote:- The ability to edit the font and font colors of a button.
Yeah this was supposed to be next feature I wanted to add before I became somewhat worried that the effort might just go down the drain.
PyTom wrote:- The ability to define new buttons.
I'm not so sure about this one since the only new buttons I've seen are the cg gallery which is quite hard to do (the gallery not buttons) so if they could make it (gallery) I don't really think they need the generator in making an extra ui.textbutton. I'll probably only include this feature when I made something like a gallery generator or ui generator.
EDIT:Suddenly understood what you meant. Actually I was making a ui/style editor(hence the name JQuartz Editor) but it turns out to be too hard. So I removed a lot of stuff and made it into a main menu generator (hence the 2 suffix) instead.
PyTom wrote:- The code itself is ugly, with every variable prefixed with "JQuartz_mainmenu_"
It's to avoid clashes with my other codes as well as other peoples codes. The naming format came from the experimental vn cause unlike python, Renpy variables and labels seem to unhidable (is there even such a word...)
Pytom wrote:At some point, however, we may want to include this in the Ren'Py distribution.
IF that time comes, I'll be honoured to have it included in the distribution.
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.

User avatar
Twar3Draconis
Regular
Posts: 129
Joined: Thu Apr 19, 2007 12:07 am
Location: Michigan, United States, Terra
Contact:

Re: UI enabled main menu generator

#4 Post by Twar3Draconis » Fri Dec 28, 2007 10:03 pm

This is pretty handy. I'll have to try this sometime, especially since my coding has been getting rusty.
Image

User avatar
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: UI enabled main menu generator

#5 Post by JQuartz » Fri Dec 28, 2007 10:52 pm

Twar3Draconis wrote:This is pretty handy.
Ke ke ke happy to hear that. But I'm not sure I can add anything new since I'll be going off for quite a while (not sure I can get internet access so fast since I don't have a laptop/internet enabled portable device).


On an not so related matter, feel free to edit and take full credit for the editor/generator if I don't come back/post anything within a month's time (counting from tomorrow) and if anyone feels that the generator is worth the trouble to improve.
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.

User avatar
Ocircuit
Regular
Posts: 39
Joined: Sun Jul 15, 2007 5:47 pm
Contact:

Re: UI enabled main menu generator

#6 Post by Ocircuit » Sat Jan 05, 2008 4:16 am

I don't understand why, but when I tried to use this i got the following error:

Code: Select all

I'm sorry, but an exception occured while executing your Ren'Py
script.

ParseError: On line 64 of C:\Documents and Settings\Owner\Desktop\renpy-5.6.3\trial/game/JQuartz_Editor2.rpy: expected ':' not found.

init python:
     ^

While parsing C:\Documents and Settings\Owner\Desktop\renpy-5.6.3\trial/game/JQuartz_Editor2.rpy.

but when I checked it there are ':' there....it doesnt make sense to me
Image

User avatar
PyTom
Ren'Py Creator
Posts: 15481
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: UI enabled main menu generator

#7 Post by PyTom » Sat Jan 05, 2008 5:07 am

5.6.3 is ancient. Probably "init python" didn't exist back then, certainly a large number of other bugs have been fixed since then.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
Ocircuit
Regular
Posts: 39
Joined: Sun Jul 15, 2007 5:47 pm
Contact:

Re: UI enabled main menu generator

#8 Post by Ocircuit » Sat Jan 05, 2008 6:39 am

yea that was the problem lol, I downloaded the newest version and it worked fine. But I wonder, is there a way to tweak it so It would allow image buttons to be used. that would be extremely helpful to me. I've been trying to figure out how to make the main menu, as well as the pref/save/load etc menus with image maps or image buttons.
Image

Guest

Re: UI enabled main menu generator

#9 Post by Guest » Sat Jan 05, 2008 12:48 pm

Wow!!! JQuartz....Thank you very much. it's useful for me and my project

User avatar
000
Regular
Posts: 94
Joined: Mon Dec 24, 2007 11:09 am
Projects: Ren'Py Russian distributive
Location: Уфа, РБ, Россия
Contact:

Re: UI enabled main menu generator

#10 Post by 000 » Sat Jan 05, 2008 1:54 pm

Ocircuit wrote:yea that was the problem lol, I downloaded the newest version and it worked fine. But I wonder, is there a way to tweak it so It would allow image buttons to be used. that would be extremely helpful to me. I've been trying to figure out how to make the main menu, as well as the pref/save/load etc menus with image maps or image buttons.
Well, I think doing main and game menг with imagemaps is quite easy, as only thing you has to do is to get an apropreate label (main_menu and game_menu I think), implement imagemaps, and depending on its returning results, jump to where you need. I thought of testing this approach myself, but coudn't pulled myself to work from these NY celebration...

Load/Save/Prefs screen, on other hand... I doubt they can be done by imagempas.
<feels sowwy for his Engrish>

User avatar
Ocircuit
Regular
Posts: 39
Joined: Sun Jul 15, 2007 5:47 pm
Contact:

Re: UI enabled main menu generator

#11 Post by Ocircuit » Sun Jan 06, 2008 1:37 am

000 wrote:
Ocircuit wrote:yea that was the problem lol, I downloaded the newest version and it worked fine. But I wonder, is there a way to tweak it so It would allow image buttons to be used. that would be extremely helpful to me. I've been trying to figure out how to make the main menu, as well as the pref/save/load etc menus with image maps or image buttons.
Well, I think doing main and game menг with imagemaps is quite easy, as only thing you has to do is to get an apropreate label (main_menu and game_menu I think), implement imagemaps, and depending on its returning results, jump to where you need. I thought of testing this approach myself, but coudn't pulled myself to work from these NY celebration...

yea that did work, thanks!
Image

Gouka
Regular
Posts: 66
Joined: Thu Feb 01, 2007 1:24 pm
Projects: Demon Wraith
Contact:

Re: UI enabled main menu generator

#12 Post by Gouka » Mon Mar 31, 2008 2:20 am

Excellent script. But is there a way to delete the text? The image buttons have a transparent background.
Check the Chaos Lord development at http://atelieredgeproductions.wordpress.com

User avatar
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: UI enabled main menu generator

#13 Post by JQuartz » Mon Mar 31, 2008 7:48 am

Actually this script isn't complete and most probably will never be...

Anyway to remove the text you can just rename the button as "(space)". Lengthen it (more space) to make the button longer.
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.

User avatar
EvilDragon
Veteran
Posts: 284
Joined: Fri Dec 28, 2007 5:47 am
Location: Where the Dragons rule!
Contact:

Re: UI enabled main menu generator

#14 Post by EvilDragon » Mon Mar 31, 2008 9:17 am

JQuartz wrote:Actually this script isn't complete and most probably will never be...
That's a lot of pessimism ^^'

Why don't you finish it in collaboration with PyTom? It would be very nice to have this thing, along with features PyTom suggested, in the bundle. I'm all for it! (Along with the options to completely make new screens, that would be cool! For example, if someone wishes to make a select story screen, or Extras screen which would link to other screens - like jukebox, gallery, etc.) In fact, I'm thinking, not just a main menu generator, but moreso a complete user interface generator. That would be nifty, and actually it would speed up the game making process, serving as a developing tool.
Angels of paradise, angels of sacrifice
Please let me be under your wings...

User avatar
EvilDragon
Veteran
Posts: 284
Joined: Fri Dec 28, 2007 5:47 am
Location: Where the Dragons rule!
Contact:

Re: UI enabled main menu generator

#15 Post by EvilDragon » Tue Apr 01, 2008 6:05 pm

I gave myself some liberty of changing JQuartz's code, purely of cosmetic nature to the editor, more sensible button naming etc. Take a look for yourselves :D
Attachments
JQuartz_Editor2_ED.rpy
(39.37 KiB) Downloaded 230 times
Angels of paradise, angels of sacrifice
Please let me be under your wings...

Post Reply

Who is online

Users browsing this forum: Google [Bot]