Author Topic: nGUI Daydream Controller Event Hooks for Scroll View  (Read 3680 times)

Evan MLB

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
nGUI Daydream Controller Event Hooks for Scroll View
« on: January 04, 2017, 04:53:01 PM »
Hey everyone,

I've been learning nGUI for the past 2 weeks and I've become very familiar with the structure.

Currently I am passing GVRController Button Press from the daydream controller by using a raycast from the controller cursor, once I found a valid UI object a command is passed to execute OnClick() via a custom class.

I wanted to implement the same sort of system with UIScrollView, I believe I have the High level understanding. (Mouse events are recognized by UI camera, Those events are passed to the nGUI elements affected, the events support touch,keyboard and controller) The Touchpad of a controller goes -1 - 1 left/right down/up.

Can I pass the OnPress(bool) Drag() commands from the daydream controller to the nGUI event system? Any help would be appreciated - I will be looking at this over the next day or so

~Evan

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: nGUI Daydream Controller Event Hooks for Scroll View
« Reply #1 on: January 05, 2017, 09:54:44 AM »
You shouldn't be sending out your own events. If you have a custom controller method, then do just that -- add a custom controller method to UICamera. All of UICamera's functionality is in delegates -- UICamera.GetKey and such. All of it can be overwritten. Your custom controller should basically be telling UICamera that there is an event, and UICamera will handle the rest.