How do I swap 9-patch image with a different one?

Get help using Construct 2

Post » Tue Apr 04, 2017 12:06 am

You're right! Now I'm curious to see what I can pull off with sprites only. Do your 9-patches dynamically resize much during runtime? Or just need a function to place them and allow them to change animation frames?
Mistakes were made.
B
51
S
25
G
107
Posts: 1,581
Reputation: 60,458

Post » Tue Apr 04, 2017 12:19 am

Some get dynamically resized during runtime, yes. And the objects in the container sometime get repositioned also.
I've been wondering perhaps a behavior could be created that is similar to the Pin behavior but just copies all the properties/position/size, etc. So a more advanced pin behavior. Then perhaps I could create the other 9patches and then create and pin them to the current 9patches at the start based on what layer it is on. Then I could control the original 9patches and the pinned ones would auto-copy that..
This seems like it might be the most sane way of handling it without all the headaches of eventsheet complexity that makes further development more difficult.
but not sure if a behavior can accomplish that yet- would need to look into how the pin behavior works and if it can be expanded.
B
43
S
19
G
65
Posts: 1,105
Reputation: 37,949

Post » Tue Apr 04, 2017 3:55 pm

So I spent some time and cloned the Pin behavior and added the option to scale the object to the pinned object's scale.
I wish I didn't have to resort to this behavior and the extra objects, but I feel like my feature requests aren't being heard so I have to make due with what I have. This is the best option I can come up with on my own.
So I might spend some more time adding more features to the behavior and then sharing it in the plugin section of the forum. I feel like it will be very useful for others.
B
43
S
19
G
65
Posts: 1,105
Reputation: 37,949

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 28 guests