Author Topic: Using simple sprite with anchors  (Read 2342 times)

nah0y

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 430
  • \o/
    • View Profile
Using simple sprite with anchors
« on: December 19, 2013, 04:44:47 AM »
Hello,

Let's say I have a UIWidget with anchors on it, so that it's size changes when the screen size changes.
So I could have this widget with a size of 100x90, and with a lower screen size, a size of 50x25.

If I have a sprite, as a child of this UIWidget, which size is 80x80.
It will render nice inside the first size, because it fits, but for the second size, it will be too big :/

So the question is : How to automatically resize the sprite so it keeps its ratio?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Using simple sprite with anchors
« Reply #1 on: December 19, 2013, 12:10:41 PM »
Keeping ratio is a planned feature. It's not in yet. I'll implement it after I'm done revamping UIInput.

nah0y

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 430
  • \o/
    • View Profile
Re: Using simple sprite with anchors
« Reply #2 on: December 19, 2013, 12:11:07 PM »
Cool!