Customizing Main Menu

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
RedReality
Newbie
Posts: 19
Joined: Thu Mar 22, 2012 2:22 am
Contact:

Customizing Main Menu

#1 Post by RedReality » Fri Mar 23, 2012 8:04 am

I'm having trouble with customizing my main menu. :?

-How can I place the group main menu buttons into a specific place in the frame? It's not well aligned...

-How do I center or align the text in the main menu buttons? It's not well aligned either.

-Is it possible to hover an image button? If yes, please give me the code.

Thanks in advance...

HigurashiKira
Miko-Class Veteran
Posts: 832
Joined: Mon Nov 01, 2010 9:10 pm
Contact:

Re: Customizing Main Menu

#2 Post by HigurashiKira » Fri Mar 23, 2012 1:54 pm

RedReality wrote:-How can I place the group main menu buttons into a specific place in the frame? It's not well aligned...
Depends where you want it to be. If you want it to be in the center, just change this bit of code:

Code: Select all

frame:
        style_group "mm"
        xalign .98
        yalign .98
If it's not aligned, maybe you accidentaly deleted this?

Code: Select all

init -2 python:

    # Make all the main menu buttons be the same size.
    style.mm_button.size_group = "mm"
RedReality wrote:-How do I center or align the text in the main menu buttons? It's not well aligned either.
It should already be centered by default, unless you've changed the code somewhat.
RedReality wrote:-Is it possible to hover an image button? If yes, please give me the code.
Here's an example:

Code: Select all

 python:
        ui.imagebutton("mr_idle.png", "mr_hover.png", clicked = ShowMenu("music_room"), ypos=0.75, xpos=0.05)
"mr_hover.png" is the hover.
I have moved to a new account. Please contact me here from now on. T/Y~

Post Reply

Who is online

Users browsing this forum: hell_oh_world