HTML [Twine, Sugarcube] Can I put a button inside an image?

Peanut Games

Newbie
Game Developer
Jan 25, 2022
54
93
I want to make a phone system for my game. So I thought if it looks like this;

phone.png

It would be so cool. Any ideas? Will not be a very advanced system. Just like clicking the embed image inside the image. That's what I think, but I don't have an idea how to write the code
 

Alcahest

Engaged Member
Donor
Game Developer
Jul 28, 2017
3,484
4,330
You do it the other way, by putting the image as the background-image of the buttons. Google how to add background images to buttons.
 

Peanut Games

Newbie
Game Developer
Jan 25, 2022
54
93
You do it the other way, by putting the image as the background-image of the buttons. Google how to add background images to buttons.
But won't they all have a different background this time? What if I make a rectangular div and put embedded images in it? Thanks for your answer by the way :giggle:
 

Alcahest

Engaged Member
Donor
Game Developer
Jul 28, 2017
3,484
4,330
Yes, you will have to add the individual images as backgrounds for each button.