Author Topic: Streching Several Sprites  (Read 2805 times)

Paul5

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
    • View Profile
Streching Several Sprites
« on: July 12, 2014, 08:54:22 AM »
Hello,
I have a chatbox with four sprites. One is the input box, another is a vertical bar on the left side, a horizontal bar at the top, and a background. I have a button located on the bottom right of the chatbox that I want to be able to click and drag around to resize the box. The problem is each sprite needs to be stretched a certain way to avoid distortion(The input box needs to be streched horizontally while the background can be stretched in any way, for example). What is the best method to accomplish this?

Thanks

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Streching Several Sprites
« Reply #1 on: July 12, 2014, 10:53:49 AM »
Use the new anchors to anchor each side of your different widgets to certain sides of your background. Look in the examples for the basic drag-to-resize functionality. If you for instance set your input box to have left and right sides anchored to the background left and right sides, and set top and bottom to both be anchored to the bottom then that one should behave as you would want. Same with the other bars.

Paul5

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
    • View Profile
Re: Streching Several Sprites
« Reply #2 on: July 12, 2014, 11:35:00 AM »
That worked nicely.

Thanks