How do I correctly set 9-patch x, y?

Get help using Construct 2

Post » Sat Dec 24, 2016 3:51 am

http://imgur.com/a/6hEtf

I got a bit of a problem I'm not sure how is even happening. I've got a bar that moves to a position on the title screen to select what option you want to do: New game, Load, Save etc. It works all fine. It's a regular old sprite. But then I realized when you select options I want to adjust the size of the bar to border new options that pop-up. that's all nice. But the sprite looks kinda ugly stretched so I changed it to a 9-patch instead. Little did I know that it wouldn't work anymore.

In the picture you can see the Y is set to the "title_"s which worked fine before but now my 9patch appears in new places.

All of the ys are meant to be: 325, 360, 395, 430, 465, 500 (corresponding to the "title_" text objects)

But are instead the Y is being set to: 77.5, 81, 84.5, 88, 91.5, 95.

The weird part is in the de-bugger the Y's of all my text objects are correct (325, 360, etc) Yet it's setting the Y to (77.5, 81, 84.5, etc)
I thought that initially the hot-spot for my 9-patch was wrong to then realize it doesn't have one. I see a correlation of 3.5 when it's meant to be 35 between all the Ys, but I don't get where the values are being pulled from? I have no other objects with that Y value,
I even changed out "title_newgame.Y" to 325 but it still wants to be set at 77.5?

Thanks, Conra
B
7
Posts: 28
Reputation: 337

Post » Sat Dec 24, 2016 4:35 am

Did you try changing the 9-patch hot spot in the object properties menu?
B
61
S
20
G
56
Posts: 1,077
Reputation: 35,991

Post » Sat Dec 24, 2016 4:15 pm

Still sets to: 77.5, 81, 84.5, 88, 91, 95.
B
7
Posts: 28
Reputation: 337

Post » Sat Dec 24, 2016 4:19 pm

The problem is where the actual sprite is positioned, it's the actual x,y of the 9-patch itself, my menu is at the lower half of the screen, where as the 9-patch is setting it's y value to overlap the title screen icon itself
B
7
Posts: 28
Reputation: 337

Post » Sat Dec 24, 2016 6:37 pm

It's hard to tell what it could be without the capx. Have you tried sizing the 9patch based on the menus bboxtop, boboxleft etc
B
61
S
20
G
56
Posts: 1,077
Reputation: 35,991

Post » Sun Dec 25, 2016 12:14 pm

It was a mistake on my part, in my previous object I had "set position" when I changed to my new 9-patch I had selected set y without realizing, so 50 was meant to be my X not my starting position for the y value since lerp requires (first position, seconds position, duration)
B
7
Posts: 28
Reputation: 337

Post » Sun Dec 25, 2016 7:26 pm

Cool. I'm glad you got it figured out.
B
61
S
20
G
56
Posts: 1,077
Reputation: 35,991


Return to How do I....?

Who is online

Users browsing this forum: koops and 6 guests