Change styles for the menus

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.
Post Reply
Message
Author
User avatar
Keinart
Regular
Posts: 133
Joined: Sun May 13, 2012 8:28 pm
Completed: One Thousand Lies
Projects: Lotus Reverie
Organization: Keinart Lobre
Tumblr: keinart
itch: keinart
Location: Spain
Contact:

Change styles for the menus

#1 Post by Keinart » Sun May 13, 2012 8:56 pm

Hello all, I am brand new here but I hope you can help me.

I recently decided to start a visual novel with a friend, I finally finished with all the text on my part and now I'm working on the visuals, with the menus for starters.

This is probably something really easy but I can't find how to make it. In the screen script, for all the diferent menus, there's the style of them, for example in the main menu template:

Code: Select all

    # The background of the main menu.
    window:
        style "mm_root"
I would like to actually create new styles, I only find the "mm_root" and the "gm_root" styles. How do I create a new one? Actually, I need to create a menu that works as a dictionary, the same that you can find in Steins;Gate. I think I know how to make it using persistents when the user find some terms so they are added to this new menu, the problem is that first I need to create the menu itself.

I need to not only change the style for the background, but also for the buttons, that in the main menu template appears like this:

Code: Select all

    # The main menu buttons.
    frame:
        style_group "mm"
How do I create new styles like the "mm" one?

That's all for now, I will probably spam the forum with more doubts for now on so I hope you can forgive me in advance :lol:

And sorry if my English is no good, I'm actually Spanish so I probably commited some mistakes.
Thank you!

User avatar
eesy
Regular
Posts: 39
Joined: Mon May 14, 2012 3:30 am
Contact:

Re: Change styles for the menus

#2 Post by eesy » Mon May 14, 2012 4:05 am

I don't actually understand what do you mean as the dictionary part, I don't play steins gate.. but if you meant you wanted to change the main menu interface
try changing them with the jpeg name like

Code: Select all

mm_root = "mm_bg.jpg", #Main-menu background
gm_root = "gm_bg.jpg", #Game-menu background
and for the button i think you need to create it with image map.. this could help you. http://lemmasoft.renai.us/forums/viewto ... nu+buttons

if that's what you meant.. xD hope it helps..

User avatar
Keinart
Regular
Posts: 133
Joined: Sun May 13, 2012 8:28 pm
Completed: One Thousand Lies
Projects: Lotus Reverie
Organization: Keinart Lobre
Tumblr: keinart
itch: keinart
Location: Spain
Contact:

Re: Change styles for the menus

#3 Post by Keinart » Mon May 14, 2012 10:05 pm

Thanks for your answer eesy.

Actually, yes, I need to change the background image, the thing is that I don't want to change it for the main menu or the game menu but for a new menu. That way when you access this new menu you get a new background, different buttons, different everyhing.

For example, you enter in the main menu, you have "start new game", "load", "preferences" and "dictionary". Dictionary would be the new menu I want to create, and if you click on it, you access the dictionary menu with a different background and different buttons. For that reason I want to create a new style, because if I use "mm_root" or "gm_root" it would look the same as the preferences menu and the main menu, and that's not my objetive.

In any case, the url you gave me is AWESOME and I'm reading it all. I really appreciate it.
I'll let you know if I manage something (I hope so :lol: ), thank you!

User avatar
eesy
Regular
Posts: 39
Joined: Mon May 14, 2012 3:30 am
Contact:

Re: Change styles for the menus

#4 Post by eesy » Tue May 15, 2012 12:21 am

Aah.. Adding new button function to a new screen!
That could be a little hard.. I haven't found the solution yet..
But do you know you can add a "gallery" button in the very first main menu.. That will unlock pictures if its been accessed during the game?
If not I'll give the link :) maybe from that you could yknow, play with the code and all.. Not sure if its possible though..
Or maybe you can even use the inventory system. But instead of filling it with with items picture, you put words in it!
But not sure if that works too..
In my game, I have a notes-like and task book interface, but that's only using picture. So it can only be accessed with in game menu (when we have 2 or more options to make decision) so when the character got a new objective, I show a new picture..but that's very beginner way. I'm sure there's a way to do it.. XD
So yes, maybe for now make it like only accessible during game menu :)
Ill let u know if I find anything.

User avatar
SundownKid
Lemma-Class Veteran
Posts: 2299
Joined: Mon Feb 06, 2012 9:50 pm
Completed: Icebound, Selenon Rising Ep. 1-2
Projects: Selenon Rising Ep. 3-4
Organization: Fastermind Games
Deviantart: sundownkid
Location: NYC
Contact:

Re: Change styles for the menus

#5 Post by SundownKid » Tue May 15, 2012 6:36 am

I am also trying to make an encyclopedia-type thing, right now the crude version is basically a very large menu but you would get the best results by using Screens.

What you would do is add a button to the main menu (located in the screens script) and use it to trigger another screen where your dictionary would be. Textbuttons in a vbox or similar would be used as entry buttons, and the text would be shown in another text box. The menu customization tutorial should help with adding buttons and such.

Post Reply

Who is online

Users browsing this forum: No registered users