Page 1 of 1

Customizing Main Menu

Posted: Fri Mar 23, 2012 8:04 am
by RedReality
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...

Re: Customizing Main Menu

Posted: Fri Mar 23, 2012 1:54 pm
by HigurashiKira
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.