Author Topic: Scale Sprite to Fill Screen on Click  (Read 3245 times)

lallous

  • Newbie
  • *
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 3
    • View Profile
Scale Sprite to Fill Screen on Click
« on: October 14, 2014, 11:20:33 AM »
Hello Fellow Devs,

I am trying to come up with the most efficient way to have a sprite fill the screen when clicked no matter its position.

I have attached a small image to explain what I am trying to do. Obviously I will be using this for animation purposes.

Thank you for your help,

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Scale Sprite to Fill Screen on Click
« Reply #1 on: October 14, 2014, 03:20:51 PM »
Given the bottom-left corner pivot, tween the widget's position from wherever it is to the screen's bottom-left corner, and at the same time tween the widget's width and height from whatever it is to screen's width and height.

lallous

  • Newbie
  • *
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: Scale Sprite to Fill Screen on Click
« Reply #2 on: October 15, 2014, 03:44:18 AM »
Thanks Aren. I will give it a shot.