Is it possible to make a 9patch object with frames?

Get help using Construct 2

Post » Wed Aug 19, 2015 5:50 pm

Can this be done? or maybe something like a 9patch behavior for the sprite object?
This would be really helpful for me, so if you can help, let me know
B
8
S
1
Posts: 29
Reputation: 569

Post » Wed Aug 19, 2015 6:39 pm

sorry for the double post but @Ashley I just noticed I can't change the 9patch properties on runtime, is there no way to do that either?
B
8
S
1
Posts: 29
Reputation: 569

Post » Wed Aug 19, 2015 6:51 pm

@edubrrx

I am not quite sure what you mean by "frames" but I made a 9-patch example for someone recently to select units in a game. It has a thin frame and transparent middle. It might be along the lines of what you are wanting...

basically, you set the margins to the thickness of the frame you want, then you can have as fancy of a frame as you want. (you may have to set the edges to Tile if Stretch makes it look bad)

http://www.rieperts.com/games/forum/Starcraft_map.capx
Last edited by AllanR on Wed Aug 19, 2015 7:04 pm, edited 1 time in total.
B
98
S
35
G
20
Posts: 438
Reputation: 17,875

Post » Wed Aug 19, 2015 7:00 pm

AllanR wrote:@edubrrx

I am not quite sure what you mean by "frames" but I made a 9-patch example for someone recently to select units in a game. It has a thin frame and transparent middle. It might be along the lines of what you are wanting...

http://www.rieperts.com/games/forum/Starcraft_map.capx


I was actually talking about making the 9patch object having animation frames, but thanks for the help :)
B
8
S
1
Posts: 29
Reputation: 569

Post » Wed Aug 19, 2015 7:05 pm

ohhhh, I see... yeah - that could be nice to have.
B
98
S
35
G
20
Posts: 438
Reputation: 17,875

Post » Wed Aug 19, 2015 7:16 pm

Short answer: nope
Long answer: nnnnnoooooppppeeee.
9patch uses elements like tiled bg which is a repeating texture, and would not work well with frames.

You can fake it with sprites, but it would be significantly less efficient than 9patch.
Image ImageImage
B
171
S
50
G
180
Posts: 8,397
Reputation: 113,988

Post » Wed Aug 19, 2015 7:22 pm

newt wrote:Short answer: nope
Long answer: nnnnnoooooppppeeee.
9patch uses elements like tiled bg which is a repeating texture, and would not work well with frames.

You can fake it with sprites, but it would be significantly less efficient than 9patch.


Do you know if we can atleast add an action to change a property of the 9patch object?
B
8
S
1
Posts: 29
Reputation: 569

Post » Wed Aug 19, 2015 7:35 pm

Probably, in the sdk.
Scirra is a bit critical of modding official plugs, but it's there as a template.
Image ImageImage
B
171
S
50
G
180
Posts: 8,397
Reputation: 113,988

Post » Wed Aug 19, 2015 8:59 pm

thanks :)
B
8
S
1
Posts: 29
Reputation: 569


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests