Here's what I want my main menu to look like:
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
[SOLVED] How to rotate imagebutton in main menu?
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.
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.
- 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?
Last edited by sapiboonggames on Mon Jul 08, 2013 10:34 am, edited 1 time in total.
Visit my website: http://www.sapiboong.com
- 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?
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(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
- 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?
I used imagebuttons before and made them with a transparent background.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.
The buttons images:
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
- 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?
Try giving the imagebutton focus_mask True.
That will do what we want. (And I misremembered the default.)
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(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
- 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?
How to make the focus_mask true?PyTom wrote:Try giving the imagebutton focus_mask True.
That will do what we want. (And I misremembered the default.)
I'm not good with programming
Visit my website: http://www.sapiboong.com
Re: How to rotate imagebutton in main menu?
Code: Select all
imagebutton:
idle "GUI/Prefs_idle.png"
hover "GUI/Prefs_hover.png"
focus_mask True
- 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?
It works like a miracle!Suwamoto wrote:Like that oxoCode: Select all
imagebutton: idle "GUI/Prefs_idle.png" hover "GUI/Prefs_hover.png" focus_mask True
Thanks you two!
Visit my website: http://www.sapiboong.com
Who is online
Users browsing this forum: Google [Bot], LuckyT