So guys, I have a question
In my game I want a character in the mid of the screen, but also, I want that on click on the character it opens a menu with choices and I don't know what's the best way to do that, imagebutton, imagemap?
The image has a transparent png background
Imagemap or what?
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.
- Per K Grok
- Miko-Class Veteran
- Posts: 882
- Joined: Fri May 18, 2018 1:02 am
- Completed: the Ghost Pilot, Sea of Lost Ships, Bubbles and the Pterodactyls, Defenders of Adacan Part 1-3, the Phantom Flyer
- itch: per-k-grok
- Location: Sverige
- Contact:
Re: Imagemap or what?
You can do this with a plain buttoniDweadith wrote: ↑Mon May 25, 2020 7:41 am So guys, I have a question
In my game I want a character in the mid of the screen, but also, I want that on click on the character it opens a menu with choices and I don't know what's the best way to do that, imagebutton, imagemap?
The image has a transparent png background
Code: Select all
screen openmenu():
button area(144, 253, 51, 87) action Jump("menu")
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3792
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: Imagemap or what?
To be honest, an image button would be easier / more convenient - you can set focus_mask to True and only the non-alpha regions of the image will respond, allowing for more shapes than just a rectangle
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Twitter
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Re: Imagemap or what?
Yes! Focus Mask is what I was looking for Thanks
Who is online
Users browsing this forum: No registered users