Inheritance: Object
Exemplo n.º 1
0
 public static int constructor(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         UnityEngine.Event o;
         if(argc==1){
             o=new UnityEngine.Event();
             pushValue(l,true);
             pushValue(l,o);
             return 2;
         }
         else if(argc==2){
             UnityEngine.Event a1;
             checkType(l,2,out a1);
             o=new UnityEngine.Event(a1);
             pushValue(l,true);
             pushValue(l,o);
             return 2;
         }
         return error(l,"New object failed.");
     }
     catch(Exception e) {
         return error(l,e);
     }
 }
Exemplo n.º 2
0
        public override void ProcessInput( Event ev )
        {
            base.ProcessInput( ev );

            if ( usePicker )
            {
                Color col = parentLight.CompGlower.Props.glowColor.ToColor;
                // set alpha to 1 (lights use alpha zero, but that won't show in the picker)
                ColorWrapper _color = new ColorWrapper( new Color( col.r, col.g, col.b ) );

                Find.WindowStack.Add( new Dialog_ColorPicker( _color, delegate
                {

                    parentLight.ChangeColor( _color.Color );
                }, ev.button == 1, true ) );
            }
            else
            {
                if( ev.button == 0 )
                {
                    parentLight.IncrementColorIndex();
                }
                else if( ev.button == 1 )
                {
                    parentLight.DecrementColorIndex();
                }
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// Note: e is null because MouseMoveProcessor doesn't deal with Event.current! (not inside of the OnGUI)
        /// </summary>
        /// <param name="e"></param>
        public override void Process(Event e)
        {
            #if DEBUG
            if (DebugMode)
                Debug.Log("MousePositionProcessor.Process");
            #endif
            Vector3 pos = Input.mousePosition;

            if (_rawMousePosition.x != pos.x || _rawMousePosition.y != pos.y)
            {
                _coords = StageUtil.FlipY(pos);

                _mousePosition.X = _coords.x;
                _mousePosition.Y = _coords.y;

            #if DEBUG
                if (DebugMode)
                    //Debug.Log("Input.mousePosition: " + Input.mousePosition + "; _rawMousePosition: " + _rawMousePosition + "; GlobalPosition:" + _coords);
                    Debug.Log("mouse: GlobalPosition:" + _mousePosition);
            #endif

                // propagate position to system manager
                SystemManager.MousePosition.X = _mousePosition.X;
                SystemManager.MousePosition.Y = _mousePosition.Y;

                _rawMousePosition = pos;
                //Debug.Log("    -> _rawMousePosition:" + _rawMousePosition);

                if (SystemManager.Instance.MouseMoveSignal.Connected)
                    SystemManager.Instance.MouseMoveSignal.Emit(null, _mousePosition.Clone());
            }
        }
        public void EventProc(Rect position, Event e)
        {
            if (labels.Count == 0) return;

            for (int i = 0; i < labels.Count; i++)
            {
                Rect buttonRect = new Rect(position.x + i * position.width / labels.Count, position.y, position.width / labels.Count, position.height);

                bool hitContain = (e.button == 0) && buttonRect.Contains(e.mousePosition);

                if (e.type == EventType.MouseDown && hitContain)
                {
                    touching = true;
                }

                if (FASGesture.IsDragging)
                {
                    touching = false;
                }

                if (e.type == EventType.MouseUp && hitContain && touching)
                {
                    e.Use();

                    OnTapped(i);

                    selectedIndex = i;
                }
            }
        }
Exemplo n.º 5
0
        public override void Process(Event e)
        {
            #if DEBUG
            if (DebugMode)
                Debug.Log("KeyboardProcessor.Process");
            #endif

            /**
             * 1) Overal key events
             * */
            if (e.type == EventType.KeyDown)
            {
            #if DEBUG
                if (DebugMode)
                    Debug.Log("KeyboardProcessor.KeyDown");
            #endif
                if (SystemManager.KeyDownSignal.Connected)
                    SystemManager.KeyDownSignal.Emit(e);

            }

            else if (e.type == EventType.KeyUp)
            {
            #if DEBUG
                if (DebugMode)
                    Debug.Log("KeyboardProcessor.KeyUp");
            #endif

                if (SystemManager.KeyUpSignal.Connected)
                    SystemManager.KeyUpSignal.Emit(e);
            }

            if (e.keyCode == KeyCode.Tab || e.character == '\t')
                e.Use();
        }
Exemplo n.º 6
0
        public override void eventHandler(GameObject gameObject, QObjectList objectList, Event currentEvent, Rect curRect)
        {
            if (currentEvent.isMouse && currentEvent.button == 0 && curRect.Contains(currentEvent.mousePosition))
            {
                bool isLock = isGameObjectLock(gameObject, objectList);

                if (currentEvent.type == EventType.MouseDown)
                {
                    targetLockState = ((!isLock) == true ? 1 : 0);
                }
                else if (currentEvent.type == EventType.MouseDrag && targetLockState != -1)
                {
                    if (targetLockState == (isLock == true ? 1 : 0)) return;
                }
                else
                {
                    targetLockState = -1;
                    return;
                }

                List<GameObject> targetGameObjects = new List<GameObject>();
                if (currentEvent.shift)
                {
                    if (!showModifierWarning || EditorUtility.DisplayDialog("Change locking", "Are you sure you want to " + (isLock ? "unlock" : "lock") + " this GameObject and all its children? (You can disable this warning in the settings)", "Yes", "Cancel"))
                    {
                        getGameObjectListRecursive(gameObject, ref targetGameObjects);
                    }
                }
                else if (currentEvent.alt)
                {
                    if (gameObject.transform.parent != null)
                    {
                        if (!showModifierWarning || EditorUtility.DisplayDialog("Change locking", "Are you sure you want to " + (isLock ? "unlock" : "lock") + " this GameObject and its siblings? (You can disable this warning in the settings)", "Yes", "Cancel"))
                        {
                            getGameObjectListRecursive(gameObject.transform.parent.gameObject, ref targetGameObjects, 1);
                            targetGameObjects.Remove(gameObject.transform.parent.gameObject);
                        }
                    }
                    else
                    {
                        Debug.Log("This action for root objects is supported only for Unity3d 5.3.3 and above");
                        return;
                    }
                }
                else
                {
                    if (Selection.Contains(gameObject))
                    {
                        targetGameObjects.AddRange(Selection.gameObjects);
                    }
                    else
                    {
                        getGameObjectListRecursive(gameObject, ref targetGameObjects, 0);
                    };
                }

                setLock(targetGameObjects, objectList, !isLock);
                currentEvent.Use();
            }
        }
Exemplo n.º 7
0
 public static void OnSceneGUI(SceneView sceneView, Event e)
 {
     if (e.type == EventType.Repaint || e.type == EventType.Layout)
     {
         OnRepaint(sceneView, e);
     }
 }
Exemplo n.º 8
0
 internal Event(UnityEngine.Event @event)
 {
     this.@event = @event;
     this.originalType = @event.type;
     this.originalRawType = @event.rawType;
     this.overrideType = EventType.Used;
     this.screenPosition = Input.mousePosition;
 }
Exemplo n.º 9
0
 public Event(Event other)
 {
     if (other == null)
     {
         throw new ArgumentException("Event to copy from is null.");
     }
     this.InitCopy(other);
 }
Exemplo n.º 10
0
 private bool OnDragPlayHead(Event evt)
 {
     this.state.currentTime = this.MousePositionToTime(evt);
     this.state.recording = true;
     this.state.playing = false;
     this.state.ResampleAnimation();
     return true;
 }
Exemplo n.º 11
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="e"></param>
 protected override void OnContextClick( Event e )
 {
     if ( Positionless || PointInControl( e.mousePosition ) )
     {
         Menu.ShowAsContext();
         e.Use();
     }
 }
Exemplo n.º 12
0
        public override void ProcessInput(Event ev)
        {
            var options = designators.Where(designator => designator.Visible)
                    .Select(designator => new FloatMenuOption_Group(designator.LabelCap, () => designator.ProcessInput(ev), designator))
                    .ToList();

            Find.WindowStack.Add(new FloatMenu_Group(options));
        }
Exemplo n.º 13
0
 public float MousePositionToValue(Event evt)
 {
     float num2 = this.m_ContentRect.height - evt.mousePosition.y;
     TimeArea timeArea = this.state.timeArea;
     float num3 = timeArea.m_Scale.y * -1f;
     float num4 = (timeArea.shownArea.yMin * num3) * -1f;
     return ((num2 - num4) / num3);
 }
Exemplo n.º 14
0
        private bool IsAllowedCombination(Event evt)
        {
            var currentEventModifiers = evt.modifiers;
            RuntimePlatform rp = Application.platform;
            bool isMac = (rp == RuntimePlatform.OSXEditor || rp == RuntimePlatform.OSXPlayer || rp == RuntimePlatform.OSXWebPlayer);
            bool ctrl = isMac ? (currentEventModifiers & EventModifiers.Command) != 0 : (currentEventModifiers & EventModifiers.Control) != 0;
            
            switch (evt.keyCode)
            {
                case KeyCode.Home:
                case KeyCode.End:
                case KeyCode.LeftControl:
                case KeyCode.RightControl:
                {
                    return true;
                }

                // Select All
                case KeyCode.A:
                {
                    if (ctrl)
                    {
                        return true;
                    }
                    break;
                }

                // Copy
                case KeyCode.C:
                {
                    if (ctrl)
                    {
                        return true;
                    }
                    break;
                }

                case KeyCode.V:
                {
                    if (ctrl)
                    {
                        OnValueInserted(this, new StringEventArgs(GetClipboard()));
                        return false;
                    }
                    break;
                }

                case KeyCode.LeftArrow:
                case KeyCode.RightArrow:
                case KeyCode.UpArrow:
                case KeyCode.DownArrow:
                {
                    return true;
                }
            }

            return false;
        }
        public override void ProcessInput( Event ev )
        {
            base.ProcessInput( ev );

            if( ev.button == 0 )
                _light.IncrementColorIndex();
            else if (ev.button == 1)
                _light.DecrementColorIndex();
        }
Exemplo n.º 16
0
 public PrefKey(string name, string shortcut)
 {
   this.m_name = name;
   this.m_event = Event.KeyboardEvent(shortcut);
   this.m_DefaultShortcut = shortcut;
   PrefKey prefKey = Settings.Get<PrefKey>(name, this);
   this.m_name = prefKey.Name;
   this.m_event = prefKey.KeyboardEvent;
 }
        void LoadButton_Clicked( IClickable sender, ClickEventArgs args, Event nativeEvent )
        {
            string path = EditorUtility.OpenFilePanel( "Load Behavior Layout", Application.dataPath, "xml" );

            if ( !string.IsNullOrEmpty( path ) )
            {
                LoadXML( path );               
            }
        }
Exemplo n.º 18
0
        public override void Draw()
        {
            currentEvent = Event.current;

            pb_Sample root = profiler != null ? profiler.GetRootSample() : null;

            SampleGraph.Draw(selectedSample);

            DrawTreeView(root);
        }
        public override void eventHandler(GameObject gameObject, QObjectList objectList, Event currentEvent, Rect curRect)
        {
            if (currentEvent.isMouse && currentEvent.type == EventType.MouseDown && currentEvent.button == 0 && curRect.Contains(currentEvent.mousePosition))
            {
                currentEvent.Use();

                Type iconSelectorType = Assembly.Load("UnityEditor").GetType("UnityEditor.IconSelector");
                MethodInfo showIconSelectorMethodInfo = iconSelectorType.GetMethod("ShowAtPosition", BindingFlags.Static | BindingFlags.NonPublic);
                showIconSelectorMethodInfo.Invoke(null, new object[] { gameObject, curRect, true });
            }
        }
Exemplo n.º 20
0
		public void FromUniqueString(string s)
		{
			int num = s.IndexOf(";");
			if (num < 0)
			{
				Debug.LogError("Malformed string in Keyboard preferences");
				return;
			}
			this.m_name = s.Substring(0, num);
			this.m_event = Event.KeyboardEvent(s.Substring(num + 1));
		}
Exemplo n.º 21
0
 public void Load()
 {
     if (!this.m_Loaded)
     {
         this.m_Loaded = true;
         this.m_event = Event.KeyboardEvent(this.m_Shortcut);
         PrefKey key = Settings.Get<PrefKey>(this.m_name, this);
         this.m_name = key.Name;
         this.m_event = key.KeyboardEvent;
     }
 }
Exemplo n.º 22
0
		protected void Begin(){
			currentEvent = Event.current;
			this.canvasSize= GetCanvasSize();
			if (currentEvent.type == EventType.Repaint){
				FsmEditorStyles.canvasBackground.Draw(canvasSize, false, false, false, false);
				DrawGrid ();
			}
			Vector2 curScroll= GUI.BeginScrollView (canvasSize, scrollPosition,scrollView,GUIStyle.none, GUIStyle.none);
			UpdateScrollPosition (curScroll);
			mousePosition = Event.current.mousePosition;
		}
 internal static void HandleSliderRectMouseDown(int id, Event evt, Rect pos)
 {
     int num = id;
     GUIUtility.keyboardControl = num;
     GUIUtility.hotControl = num;
     s_CurrentMousePosition = evt.mousePosition;
     s_DragStartScreenPosition = evt.mousePosition;
     Vector2 vector = Handles.matrix.MultiplyPoint((Vector3) pos.center);
     s_DragScreenOffset = s_CurrentMousePosition - vector;
     EditorGUIUtility.SetWantsMouseJumping(1);
 }
Exemplo n.º 24
0
 static public int get_isScrollWheel(IntPtr l)
 {
     try {
         UnityEngine.Event self = (UnityEngine.Event)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.isScrollWheel);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 25
0
 static public int get_keyCode(IntPtr l)
 {
     try {
         UnityEngine.Event self = (UnityEngine.Event)checkSelf(l);
         pushValue(l, true);
         pushEnum(l, (int)self.keyCode);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 26
0
 static public int Use(IntPtr l)
 {
     try {
         UnityEngine.Event self = (UnityEngine.Event)checkSelf(l);
         self.Use();
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 27
0
        protected override void OnMouseDown( Event e )
        {
            if ( m_label.PointInControl( e.mousePosition ) )
            {
                if ( BoundDecoratorlSelected != null && m_target != null )
                {
                    BoundDecoratorlSelected( m_target, e.button );
                }

                e.Use();
            }            
        }
#pragma warning restore 649

		public void Subscribe(Event e, Action a)
		{
			switch (e)
			{
				case Event.CollisionEnter:	_OnCollisionEnter.AddListener(new UnityAction(a));	break;
				case Event.CollisionExit:	_OnCollisionExit.AddListener(new UnityAction(a));	break;
				case Event.CollisionStay:	_OnCollisionStay.AddListener(new UnityAction(a));	break;
				case Event.TriggerEnter:	_OnTriggerEnter.AddListener(new UnityAction(a));	break;
				case Event.TriggerExit:		_OnTriggerExit.AddListener(new UnityAction(a));		break;
				case Event.TriggerStay:		_OnTriggerStay.AddListener(new UnityAction(a));		break;
			}
		}
Exemplo n.º 29
0
 static public int get_displayIndex(IntPtr l)
 {
     try {
         UnityEngine.Event self = (UnityEngine.Event)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.displayIndex);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int get_functionKey(IntPtr l)
 {
     try {
         UnityEngine.Event self = (UnityEngine.Event)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.functionKey);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
        protected override void OnToolGUI(Event e)
        {
            if (!this.m_toolController.IsInsideUI &&
                e.type == EventType.MouseDown || (e.type == EventType.MouseDrag && this.m_mode == TreeTool.Mode.Single))
            {
                if (e.button == 0)
                {

                    mouseLeftDownField.SetValue(this, true);
                    if (this.m_mode != TreeTool.Mode.Single)
                        return;
                    var mousePosition = (Vector3)mousePositionField.GetValue(this);
                    if (!lastAllowedMousePosition.Equals(Vector3.zero))
                    {
                        if (m_strength < 1.0)
                        {
                            var distance = 25;
                            if (Math.Pow(mousePosition.x - lastAllowedMousePosition.x, 2) +
                                Math.Pow(mousePosition.z - lastAllowedMousePosition.z, 2) < Math.Pow(distance - distance * m_strength, 2))
                            {
                                return;
                            }
                        }
                    }
                    lastAllowedMousePosition = mousePosition;
                    Singleton<SimulationManager>.instance.AddAction(
                        (IEnumerator)createTreeMethodInfo.Invoke(this, new object[] { }));
                }
                else
                {
                    if (e.button != 1)
                        return;
                    mouseRightDownField.SetValue(this, true);
                }
            }
            else
            {
                if (e.type != EventType.MouseUp)
                    return;
                if (e.button == 0)
                {
                    mouseLeftDownField.SetValue(this, false);
                    lastAllowedMousePosition = Vector3.zero;
                }
                else
                {
                    if (e.button != 1)
                        return;
                    mouseRightDownField.SetValue(this, false);
                }
            }
        }
Exemplo n.º 32
0
 public void FromUniqueString(string s)
 {
     int index = s.IndexOf(";");
     if (index < 0)
     {
         Debug.LogError("Malformed string in Keyboard preferences");
     }
     else
     {
         this.m_name = s.Substring(0, index);
         this.m_event = Event.KeyboardEvent(s.Substring(index + 1));
     }
 }
Exemplo n.º 33
0
 public void FromUniqueString(string s)
 {
   int length = s.IndexOf(";");
   if (length < 0)
   {
     Debug.LogError((object) "Malformed string in Keyboard preferences");
   }
   else
   {
     this.m_name = s.Substring(0, length);
     this.m_event = Event.KeyboardEvent(s.Substring(length + 1));
   }
 }
        void m_treeIdField_ValueChange( IEditable sender, EditEventArgs args, Event nativeEvent )
        {
            string s = args.newValue as string;

            if ( string.IsNullOrEmpty( s ) )
            {
                m_generateButton.Enabled = false;
            }
            else
            {
                m_generateButton.Enabled = true;
            }
        }        
        public override void ProcessInput(Event ev)
        {
            base.ProcessInput(ev);

            if (ev.button == 0)
            {
                parentContainer.IncreasePriority();
            }
            else if (ev.button == 1)
            {
                parentContainer.DecreasePriority();
            }
        }
 static int set_current(IntPtr L)
 {
     try
     {
         UnityEngine.Event arg0 = (UnityEngine.Event)ToLua.CheckObject(L, 2, typeof(UnityEngine.Event));
         UnityEngine.Event.current = arg0;
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static public int set_commandName(IntPtr l)
 {
     try {
         UnityEngine.Event self = (UnityEngine.Event)checkSelf(l);
         string            v;
         checkType(l, 2, out v);
         self.commandName = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int set_character(IntPtr l)
 {
     try {
         UnityEngine.Event self = (UnityEngine.Event)checkSelf(l);
         System.Char       v;
         checkType(l, 2, out v);
         self.character = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int set_pressure(IntPtr l)
 {
     try {
         UnityEngine.Event self = (UnityEngine.Event)checkSelf(l);
         float             v;
         checkType(l, 2, out v);
         self.pressure = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int set_modifiers(IntPtr l)
 {
     try {
         UnityEngine.Event          self = (UnityEngine.Event)checkSelf(l);
         UnityEngine.EventModifiers v;
         checkEnum(l, 2, out v);
         self.modifiers = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int set_numeric(IntPtr l)
 {
     try {
         UnityEngine.Event self = (UnityEngine.Event)checkSelf(l);
         bool v;
         checkType(l, 2, out v);
         self.numeric = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int set_delta(IntPtr l)
 {
     try {
         UnityEngine.Event   self = (UnityEngine.Event)checkSelf(l);
         UnityEngine.Vector2 v;
         checkType(l, 2, out v);
         self.delta = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int set_displayIndex(IntPtr l)
 {
     try {
         UnityEngine.Event self = (UnityEngine.Event)checkSelf(l);
         int v;
         checkType(l, 2, out v);
         self.displayIndex = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 44
0
    void OnGUI()
    {
        Event e = Event.current;

        if (e.isKey)
        {
            this.lastKey = e.keyCode;
        }
        else if (e.isMouse)
        {
            switch (e.button)
            {
            case 0:
                this.lastKey = KeyCode.Mouse0;
                break;

            case 1:
                this.lastKey = KeyCode.Mouse1;
                break;

            case 2:
                this.lastKey = KeyCode.Mouse2;
                break;

            case 3:
                this.lastKey = KeyCode.Mouse3;
                break;

            case 4:
                this.lastKey = KeyCode.Mouse4;
                break;

            case 5:
                this.lastKey = KeyCode.Mouse5;
                break;

            case 6:
                this.lastKey = KeyCode.Mouse6;
                break;

            default:
                this.lastKey = KeyCode.None;
                break;
            }
        }
        else
        {
            this.lastKey = KeyCode.None;
        }
    }
 static public int set_keyCode(IntPtr l)
 {
     try {
         UnityEngine.Event   self = (UnityEngine.Event)checkSelf(l);
         UnityEngine.KeyCode v;
         checkEnum(l, 2, out v);
         self.keyCode = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static int Use(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         UnityEngine.Event obj = (UnityEngine.Event)ToLua.CheckObject(L, 1, typeof(UnityEngine.Event));
         obj.Use();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static public int GetTypeForControl(IntPtr l)
 {
     try {
         UnityEngine.Event self = (UnityEngine.Event)checkSelf(l);
         System.Int32      a1;
         checkType(l, 2, out a1);
         var ret = self.GetTypeForControl(a1);
         pushValue(l, true);
         pushEnum(l, (int)ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static int ToString(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         UnityEngine.Event obj = (UnityEngine.Event)ToLua.CheckObject(L, 1, typeof(UnityEngine.Event));
         string            o   = obj.ToString();
         LuaDLL.lua_pushstring(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int GetHashCode(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         UnityEngine.Event obj = (UnityEngine.Event)ToLua.CheckObject(L, 1, typeof(UnityEngine.Event));
         int o = obj.GetHashCode();
         LuaDLL.lua_pushinteger(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int ProcessEvent(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         UnityEngine.UI.InputField obj  = (UnityEngine.UI.InputField)ToLua.CheckObject <UnityEngine.UI.InputField>(L, 1);
         UnityEngine.Event         arg0 = (UnityEngine.Event)ToLua.CheckObject(L, 2, typeof(UnityEngine.Event));
         obj.ProcessEvent(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int PopEvent(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         UnityEngine.Event arg0 = (UnityEngine.Event)ToLua.CheckObject(L, 1, typeof(UnityEngine.Event));
         bool o = UnityEngine.Event.PopEvent(arg0);
         LuaDLL.lua_pushboolean(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int KeyboardEvent(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         string            arg0 = ToLua.CheckString(L, 1);
         UnityEngine.Event o    = UnityEngine.Event.KeyboardEvent(arg0);
         ToLua.PushSealed(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int GetTypeForControl(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         UnityEngine.Event obj = (UnityEngine.Event)ToLua.CheckObject(L, 1, typeof(UnityEngine.Event));
         int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
         UnityEngine.EventType o = obj.GetTypeForControl(arg0);
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
    static int set_commandName(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.Event obj  = (UnityEngine.Event)o;
            string            arg0 = ToLua.CheckString(L, 2);
            obj.commandName = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index commandName on a nil value"));
        }
    }
    static int set_displayIndex(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.Event obj = (UnityEngine.Event)o;
            int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
            obj.displayIndex = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index displayIndex on a nil value"));
        }
    }
    static int set_character(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.Event obj = (UnityEngine.Event)o;
            char arg0             = (char)LuaDLL.luaL_checknumber(L, 2);
            obj.character = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index character on a nil value"));
        }
    }
    static int set_pressure(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.Event obj  = (UnityEngine.Event)o;
            float             arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
            obj.pressure = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index pressure on a nil value"));
        }
    }
    static int set_modifiers(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.Event          obj  = (UnityEngine.Event)o;
            UnityEngine.EventModifiers arg0 = (UnityEngine.EventModifiers)ToLua.CheckObject(L, 2, typeof(UnityEngine.EventModifiers));
            obj.modifiers = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index modifiers on a nil value"));
        }
    }
    static int Equals(IntPtr L)
    {
        try
        {
            ToLua.CheckArgsCount(L, 2);
            UnityEngine.Event obj  = (UnityEngine.Event)ToLua.CheckObject(L, 1, typeof(UnityEngine.Event));
            object            arg0 = ToLua.ToVarObject(L, 2);
            bool o = obj != null?obj.Equals(arg0) : arg0 == null;

            LuaDLL.lua_pushboolean(L, o);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
    static int set_keyCode(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.Event   obj  = (UnityEngine.Event)o;
            UnityEngine.KeyCode arg0 = (UnityEngine.KeyCode)ToLua.CheckObject(L, 2, typeof(UnityEngine.KeyCode));
            obj.keyCode = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index keyCode on a nil value"));
        }
    }