Author Topic: Not possible to hover on Android in any way?  (Read 1988 times)

Fritsl

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 3
    • View Profile
Not possible to hover on Android in any way?
« on: July 01, 2014, 05:38:50 AM »
I’m doing an Android based ‘Joypad’ type of thing, and thought I could use NGUI, but it appears not - or did I miss something?
Here's the deal:
  • 3 by 3 buttons in a square
  • User touch any, and it’s selected instantly
Check to the above, not a problem.

Problems:

Scenario 1:
  • After selecting the first ‘pad’, user moves finger, and I’d like what ever is hovered to be selected, continuously around on the pad.
Not possible, right??

Scenario 2:
  • User starts finger outside 3 by 3, drags finger in to touch any 3 by 3 - and I’d like to activate the one touched.
Not possible either, right?


Because of the limitations in the event system:
void OnHover (bool isOver) – Sent out when the mouse hovers over the collider or moves away from it. Not sent on touch-based devices.

So this task / type of Joypad cannot be done with NGUI, right?

Thanks.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Not possible to hover on Android in any way?
« Reply #1 on: July 02, 2014, 03:28:24 AM »
Sure it can be. UIButton script has an option that lets you change what happens when it's dragged over. Highlighting is one of the options. NGUI sends out OnDragOver when you drag a touch over some object, and OnDragOut when you drag the touch away. Listen for those events in a script of yours, and you can do what you want.

Fritsl

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: Not possible to hover on Android in any way?
« Reply #2 on: July 02, 2014, 03:49:58 AM »
Thank you. But this page:

http://www.tasharen.com/?page_id=160
only describes the option for OnDragEvent.

And unfortunately the NGuiEventsToPlaymakerFsmEvents also only what's written in that page :/

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Not possible to hover on Android in any way?
« Reply #3 on: July 02, 2014, 05:58:43 AM »
That page should be removed. It's extremely old. NGUI's documentation is linked from NGUI -> Help menu. It's also found here:

http://www.tasharen.com/forum/index.php?topic=6754.0

The page you're looking for that describes events is here:

http://www.tasharen.com/forum/index.php?topic=6711.0

Fritsl

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: Not possible to hover on Android in any way?
« Reply #4 on: July 02, 2014, 06:06:03 AM »
!