Author Topic: UIDraggablePanel  (Read 5131 times)

xerx

  • Guest
UIDraggablePanel
« on: May 30, 2013, 02:02:39 AM »
Hi,

Is there a way i can simulate a swipe from within a code and not just by drag ?
i want to be able to set the draggable panel position manually,by script.

please let me know how can i do it.

Thanks

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIDraggablePanel
« Reply #1 on: May 30, 2013, 03:04:00 PM »
Useful stuff sticky, skyrim UI.

wizardsmoke

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 5
  • Posts: 40
    • View Profile
Re: UIDraggablePanel
« Reply #2 on: May 30, 2013, 08:37:20 PM »
Use SpringPanel.  For example:

  1. SpringPanel.Begin(gameObject, transform.localPosition + offset, springStrength);
  2.  

SpringPanel moves the panel while adjusting the clipping such that the clipping stays in the same world position.  Hope this helps.  ;)