trouble with button size

Get help using Construct 2

Post » Sun Mar 02, 2014 12:08 am

I've created a button which is pinned to a sprite (to create a context menu).

In the layout I make the button width 165 and the grey sprite is 175 in width;

Image

however when I run the game up the button is now wider than the sprite;

Image

Any ideas on what I've done wrong?
B
5
S
1
Posts: 34
Reputation: 364

Post » Sun Mar 02, 2014 12:39 am

Buttons are actually drawn by the browser, which can override C2s values. They are good for quick and easy button objects, but if you need precise alignment, you'll need to do your own buttons as a Sprite or 9-patch.
ImageImageImage
B
71
S
22
G
241
Posts: 3,734
Reputation: 134,494

Post » Sun Mar 02, 2014 12:42 am

thanks for the explanation blackhornet
B
5
S
1
Posts: 34
Reputation: 364

Post » Sun Mar 02, 2014 9:03 am

I always suggest everyone to use sprite buttons.
I will not let you reach the sisters
Nature Forums
B
11
S
5
G
2
Posts: 496
Reputation: 2,306



Return to How do I....?

Who is online

Users browsing this forum: Armench, Artcadev, farsen, Yahoo [Bot] and 14 guests