Sized ImageButtons?

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
HypersDev
Newbie
Posts: 18
Joined: Thu Jul 16, 2020 1:43 am
Projects: DutyCalls
itch: ItsHypers
Contact:

Sized ImageButtons?

#1 Post by HypersDev »

Hello all!

Is there a way to re-size image buttons to be a certain shape?

I am creating a point and click game, and I have only figured out how to add an image button in a certain bit of an image, instead of a certain area...
image_2021-07-30_010106.png
image_2021-07-30_010106.png (134.05 KiB) Viewed 1159 times
I want an image-button to be the size of this door, although I can only figure out how to do a pixel of it, instead of the whole thing.

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2376
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Sized ImageButtons?

#2 Post by Ocelot »

Step 1: make everything, but areas you want to be sensitive, transparent. Like that:
Image

Step 2: create an imagebutton using this image and place it in its proper place

Step 3: set focus_mask property to True: https://www.renpy.org/doc/html/style_pr ... focus_mask
< < insert Rick Cook quote here > >

User avatar
HypersDev
Newbie
Posts: 18
Joined: Thu Jul 16, 2020 1:43 am
Projects: DutyCalls
itch: ItsHypers
Contact:

Re: Sized ImageButtons?

#3 Post by HypersDev »

Ocelot wrote: Thu Jul 29, 2021 8:11 pm Step 1: make everything, but areas you want to be sensitive, transparent. Like that:
Image

Step 2: create an imagebutton using this image and place it in its proper place

Step 3: set focus_mask property to True: https://www.renpy.org/doc/html/style_pr ... focus_mask
That seems like a lot for something so trivial, I'll give it a shot though! ty

Post Reply

Who is online

Users browsing this forum: Bing [Bot], downover, Google [Bot]