Пример #1
0
        protected override bool DoKeyDown(KeyboardEventArgs args)
        {
            bool result;

            if (args.character == ' ' && GUIUtility.keyboardControl == base.id)
            {
                GUIUtility.SetChanged(true);
                this.wasPressed = true;
                result          = true;
            }
            else
            {
                result = false;
            }
            return(result);
        }
Пример #2
0
        protected override bool DoMouseUp(MouseEventArgs args)
        {
            bool result;

            if (GUIUtility.hotControl == base.id)
            {
                GUIUtility.hotControl = 0;
                if (base.position.Contains(args.mousePosition))
                {
                    GUIUtility.SetChanged(true);
                    this.wasPressed = true;
                }
                result = true;
            }
            else
            {
                result = false;
            }
            return(result);
        }