Page 1 of 4

Main menu generator (ver 1.15)

Posted: Mon Dec 24, 2007 6:23 pm
by JQuartz
###############################################################################
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

Re: UI enabled main menu generator

Posted: Thu Dec 27, 2007 3:24 pm
by PyTom
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.

Re: UI enabled main menu generator

Posted: Thu Dec 27, 2007 8:25 pm
by JQuartz
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.

Re: UI enabled main menu generator

Posted: Fri Dec 28, 2007 10:03 pm
by Twar3Draconis
This is pretty handy. I'll have to try this sometime, especially since my coding has been getting rusty.

Re: UI enabled main menu generator

Posted: Fri Dec 28, 2007 10:52 pm
by JQuartz
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.

Re: UI enabled main menu generator

Posted: Sat Jan 05, 2008 4:16 am
by Ocircuit
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

Re: UI enabled main menu generator

Posted: Sat Jan 05, 2008 5:07 am
by PyTom
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.

Re: UI enabled main menu generator

Posted: Sat Jan 05, 2008 6:39 am
by Ocircuit
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.

Re: UI enabled main menu generator

Posted: Sat Jan 05, 2008 12:48 pm
by Guest
Wow!!! JQuartz....Thank you very much. it's useful for me and my project

Re: UI enabled main menu generator

Posted: Sat Jan 05, 2008 1:54 pm
by 000
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.

Re: UI enabled main menu generator

Posted: Sun Jan 06, 2008 1:37 am
by Ocircuit
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!

Re: UI enabled main menu generator

Posted: Mon Mar 31, 2008 2:20 am
by Gouka
Excellent script. But is there a way to delete the text? The image buttons have a transparent background.

Re: UI enabled main menu generator

Posted: Mon Mar 31, 2008 7:48 am
by JQuartz
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.

Re: UI enabled main menu generator

Posted: Mon Mar 31, 2008 9:17 am
by EvilDragon
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.

Re: UI enabled main menu generator

Posted: Tue Apr 01, 2008 6:05 pm
by EvilDragon
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