Author Topic: How to set the maximum range in UIDragResize  (Read 1502 times)

outgoing

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 10
    • View Profile
How to set the maximum range in UIDragResize
« on: February 14, 2014, 06:57:00 AM »
Good day
Who can tell how to set the maximum range in UIDragResize or workarounds.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: How to set the maximum range in UIDragResize
« Reply #1 on: February 15, 2014, 12:56:39 AM »
DragResize script just uses NGUIMath.ResizeWidget, which doesn't have a "max" parameter. Only "min". Easiest way to limit something's side is to do it inside UIDragResize's OnDrag function, just before passing the values to NGUIMath.ResizeWidget, or to just do your own logic after the resize operation -- is the widget's size bigger than some value? If so, just set it to that value.

outgoing

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 10
    • View Profile
Re: How to set the maximum range in UIDragResize
« Reply #2 on: February 17, 2014, 09:59:24 AM »
Quick do not work, you should still limit movement when masshtabiruesh dostigaesh and maximum limit  :(