Author Topic: Boo + NGUI Buttons (EventListeners, specifically)  (Read 1324 times)

Taugeshtu

  • Guest
Boo + NGUI Buttons (EventListeners, specifically)
« on: August 27, 2013, 01:18:09 PM »
Hi there. Right, here's some C# code:
  1. ...
  2.     [SerializeField] private UIEventListener _someButton = null;
  3.  
  4.     protected override void Start(){
  5.         _someButton.onClick += SomeButton_onClick;
  6.     }
  7.     private void SomeButton_onClick( GameObject sender ){
  8.         Debug.Log("!!");
  9.     }
All of which is MonoBehaviour.
Now, in boo:
  1. ...
  2.         public L as UIEventListener
  3.  
  4.         def Awake():
  5.                 L.onClick += Some
  6.  
  7.         def OnDestroy():
  8.                 L.onClick -= Some
  9.  
  10.         private def Some():
  11.                 Debug.Log( "!!" )

Aaaand compilation error!
Here:
Quote
Operator '+' cannot be used with a left hand side of type 'UIEventListener.VoidDelegate' and a right hand side of type 'callable() as void'.

Is there any way I could make NGUI buttons work with boo, or should I give up on it and search/write other GUI system?