Author Topic: Restricting events to within a clipped panel  (Read 4067 times)

jmclaren

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Restricting events to within a clipped panel
« on: October 24, 2012, 06:10:56 AM »
Is there a way to restrict events triggering such as button pushes and dragging, to within the bounds of a clipping area of a Panel on a draggable panel?

In most situatiions I can get round it by putting masking collision boxes above and below the draggable area, but this isn't always possible. For example when it comes to a scrolling panel on a non modal popup. ie I still need to be able to select things above and below the popup, when the popup is up.

Any ideas?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Restricting events to within a clipped panel
« Reply #1 on: October 24, 2012, 05:00:30 PM »
Create a collider that will cover the area outside the clipped panel. It's not ideal, but that's the only way.

jmclaren

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Re: Restricting events to within a clipped panel
« Reply #2 on: October 25, 2012, 09:52:37 AM »
Yes, that is what I am doing, but that doesn't allow for the non modal popup.

Imagine you are playing an rpg and you bring up an inventory popup,  there is no way as far as I can see just to mask touches directly behind the popup, and not the area around it. Therefore I wouldn't be able to have a scrolling inventory panel, without interfering with gameplay.
« Last Edit: October 25, 2012, 09:55:34 AM by jmclaren »