Hello Guest

Author Topic: Touch response is not quite good in ScrollableArea  (Read 4690 times)

cloudchen

  • Newbie
  • *
  • Posts: 16
    • View Profile
Touch response is not quite good in ScrollableArea
« on: August 15, 2013, 09:35:40 am »
I have lots of scrollable area controller object in my game, and I found the touch sensitivity/response is not very good when I try to click the items contain in the scrollable area.

For example, I have one looks like below:


When I click between those items, sometimes it just doesn't response to my clicking. Sometimes I need to click around 3 times on a single item to make the event got triggered.

Each item has a tk2dUIItem appended on it, and I use the OnClick event to trigger what I would like to do. I guess the problem might cause by the judgement between "scroll/click" state because the event got triggered immediately when I use the OnDown or OnRelease event instead. However, that will trigger the touch event even users just want to scroll to browse all of the items.

Sincerely wait for your aid, thanks again.

Update: (Thursday, August 15, 2013)
I found if I modified:
Code: [Select]
private const float SWIPE_SCROLLING_FIRST_SCROLL_THRESHOLD = .01fto a much more large value such as 30f, then this issue just got solved.

I use tk2dCamera as main camera and set Pixels per Meter to 1, force the Native Resolution be 720 x 1280. I guess there is no corresponding transformation of SWIPE_SCROLLING_FIRST_SCROLL_THRESHOLD according to different tk2dCamera setting?
« Last Edit: August 15, 2013, 10:10:16 am by cloudchen »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Touch response is not quite good in ScrollableArea
« Reply #1 on: August 15, 2013, 01:37:00 pm »
Yes there isn't a corresponding value - I will scale it based on the size of the scrollable area, thanks for pointing this out.

cloudchen

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Touch response is not quite good in ScrollableArea
« Reply #2 on: August 19, 2013, 11:25:22 am »
Hi, I got another question while dealing with ScrollableArea. As the image in my 1st post shown, now I have 7 items in the row (so two out of the screen). If I scroll the content to the end and select the last item, the area will stop at the end of the row so that now the 1st and 2nd item will out of the screen instead.

I would like to know how could I make a script call so that the scrollable area returned to the launch status (the 1st item align the left border of the screen)?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Touch response is not quite good in ScrollableArea
« Reply #3 on: August 19, 2013, 11:44:41 am »
Wouldn't setting Value = 0 do that?

cloudchen

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Touch response is not quite good in ScrollableArea
« Reply #4 on: November 23, 2013, 02:46:20 pm »
Did you fix the sensitivity issue? After update to version 2.2.3, should I still tweak the value to get the balance between scrolling and touching?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Touch response is not quite good in ScrollableArea
« Reply #5 on: November 23, 2013, 07:30:51 pm »
You will still need to adjust it if you use non default sizes. I haven't had a chance to set up the necessary test cases to implement this properly yet.