Author Topic: UIDraggablePanel behavior: sticks to right edge  (Read 8159 times)

col000r

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 3
  • Posts: 43
  • Mighty Emperor of Planet "Home Office"
    • View Profile
    • BLACKISH
UIDraggablePanel behavior: sticks to right edge
« on: June 28, 2012, 04:05:08 AM »
There's something that nags me about the default behavior of UIDraggablePanel:

If the content doesn't fill the entire clipping area and I swipe to the right, the content bounces back and sticks to the right edge, when I would expect it to go back all the way to the left edge. - This is the default behavior on iOS, so everyone who's used an iPhone or iPad would expect it to behave that way (same for top/bottom). Could you please fix that?
Games: BLACKISH | Blog | Assets

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIDraggablePanel behavior: sticks to right edge
« Reply #1 on: June 28, 2012, 05:04:01 AM »
Checking "Disable Drag If Fits" on UIDraggablePanel might be the better option.

col000r

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 3
  • Posts: 43
  • Mighty Emperor of Planet "Home Office"
    • View Profile
    • BLACKISH
Re: UIDraggablePanel behavior: sticks to right edge
« Reply #2 on: June 28, 2012, 09:12:16 AM »
Another thing: What's the best way to move a widget from one panel to another?

I drag an object out of a UIGrid, put it onto a new panel, then let go and it gets put back onto the previous panel. But the geometry stays on the intermediate panel and the image no longer moves with the rest of the UIGrid. The gameObject is there and it moves with the UIGrid, but the mesh doesn't seem to be regenerating... How do I get the two panels to refresh their meshes?
Games: BLACKISH | Blog | Assets

col000r

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 3
  • Posts: 43
  • Mighty Emperor of Planet "Home Office"
    • View Profile
    • BLACKISH
Re: UIDraggablePanel behavior: sticks to right edge
« Reply #3 on: June 28, 2012, 09:19:39 AM »
If I call the UIPanels' Refresh() functions (from inside Update() of my Inventory script), Unity becomes unresponsive and I have to force-quit it...
Games: BLACKISH | Blog | Assets

col000r

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 3
  • Posts: 43
  • Mighty Emperor of Planet "Home Office"
    • View Profile
    • BLACKISH
Re: UIDraggablePanel behavior: sticks to right edge
« Reply #4 on: June 28, 2012, 09:55:30 AM »
Alright. Carefully doing RemoveWidget() on one panel and AddWidget() on the other panel each time I move something does the trick...
Games: BLACKISH | Blog | Assets

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIDraggablePanel behavior: sticks to right edge
« Reply #5 on: June 28, 2012, 10:58:28 AM »
As a note, Drag & drop example shows the correct order of events for this as I recall.