Author Topic: Any way to n-slice this asset in this manner?  (Read 6095 times)

jchowdown

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 16
    • View Profile
Any way to n-slice this asset in this manner?
« on: September 05, 2014, 06:49:45 PM »
Hi, I have a image that's meant to be used as a background. It has a gradient across the top and some crosshatching along the bottom:
http://screencast.com/t/aMiW4V3cny6

Is there a way to n-slice this asset so that no matter how big the UISprite is, the following properties are maintained?
1) the top gradient's height stays the same
2) the bottom crosshatching height stays the same
3) the horizontal band of solid dark green resizes as the UISprite height changes
4) as the UISprite width changes, the texture is tiled left/right so that the angle of the crosshatches doesn't change

Thanks in advance,
Jeff

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Any way to n-slice this asset in this manner?
« Reply #1 on: September 06, 2014, 02:03:54 AM »
The best way to do something like this would be to use 2 sprites. Tiled sprite for the diagonal lines, and a regular or sliced sprite for the gradient.