[SOLVED] How to rotate imagebutton in 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
sapiboonggames
Veteran
Posts: 299
Joined: Thu Jan 05, 2012 8:53 am
Completed: I Love You, Brother [BxB]
Contact:

[SOLVED] How to rotate imagebutton in main menu?

#1 Post by sapiboonggames »

Here's what I want my main menu to look like:

Image

But as it is now, I can't get the buttons to work properly. The imagebuttons I'm talking about, are the "Start game", "Load game", "Bonus", "Exit".
I want to rotate the imagebuttons in a certain angle so it will look like the image above
I saw in renpy tutorial game that it is possible to rotate textbutton, so I thought it would be possible with imagebutton

So, please let me know if it possible to make it and how to do it. Thanks :D
Last edited by sapiboonggames on Mon Jul 08, 2013 10:34 am, edited 1 time in total.
Visit my website: http://www.sapiboong.com

User avatar
PyTom
Ren'Py Creator
Posts: 16096
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: How to rotate imagebutton in main menu?

#2 Post by PyTom »

If you're using imagebuttons, and not hotspots, it should just work - use a transparent background for the buttons, and Ren'Py should handle the focus for them properly.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
sapiboonggames
Veteran
Posts: 299
Joined: Thu Jan 05, 2012 8:53 am
Completed: I Love You, Brother [BxB]
Contact:

Re: How to rotate imagebutton in main menu?

#3 Post by sapiboonggames »

PyTom wrote:If you're using imagebuttons, and not hotspots, it should just work - use a transparent background for the buttons, and Ren'Py should handle the focus for them properly.
I used imagebuttons before and made them with a transparent background.

The buttons images:
Image

Image

But renpy seems to still detect the transparent background and I can only click load game.
I made them all the same size to make it easier for positioning.
Visit my website: http://www.sapiboong.com

User avatar
PyTom
Ren'Py Creator
Posts: 16096
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: How to rotate imagebutton in main menu?

#4 Post by PyTom »

Try giving the imagebutton focus_mask True.

That will do what we want. (And I misremembered the default.)
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
sapiboonggames
Veteran
Posts: 299
Joined: Thu Jan 05, 2012 8:53 am
Completed: I Love You, Brother [BxB]
Contact:

Re: How to rotate imagebutton in main menu?

#5 Post by sapiboonggames »

PyTom wrote:Try giving the imagebutton focus_mask True.

That will do what we want. (And I misremembered the default.)
How to make the focus_mask true?
I'm not good with programming :)
Visit my website: http://www.sapiboong.com

User avatar
Suwamoto
Regular
Posts: 66
Joined: Wed Sep 05, 2012 7:36 am
Contact:

Re: How to rotate imagebutton in main menu?

#6 Post by Suwamoto »

Code: Select all

imagebutton: 
	idle "GUI/Prefs_idle.png" 
	hover "GUI/Prefs_hover.png"
	focus_mask True
Like that oxo

User avatar
sapiboonggames
Veteran
Posts: 299
Joined: Thu Jan 05, 2012 8:53 am
Completed: I Love You, Brother [BxB]
Contact:

Re: How to rotate imagebutton in main menu?

#7 Post by sapiboonggames »

Suwamoto wrote:

Code: Select all

imagebutton: 
	idle "GUI/Prefs_idle.png" 
	hover "GUI/Prefs_hover.png"
	focus_mask True
Like that oxo
It works like a miracle!
Thanks you two!
Visit my website: http://www.sapiboong.com

Post Reply

Who is online

Users browsing this forum: Google [Bot], LuckyT