Author Topic: Turn on UISprite's "Fill Center" in code  (Read 2823 times)

ConfluxGames

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 6
    • View Profile
Turn on UISprite's "Fill Center" in code
« on: November 19, 2014, 11:28:58 AM »
So it looks like you can turn off the fill center of a ui sprite by setting the sprite.centerType = UISprite.AdvancedType.Invisible

However, if you try to turn it back on with sprite.centerType = UISprite.AdvancedType.Sliced it does not work.

Anyone have a solution for turning the "fill center" back on after it has been turned off in code.

Cheers

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Turn on UISprite's "Fill Center" in code
« Reply #1 on: November 19, 2014, 03:54:40 PM »
Call MarkAsChanged() after altering those fields.