Exemple #1
0
    internal void OnEvent(UICamera camera, NGUIHack.Event @event, EventType type)
    {
        switch (type)
        {
        case EventType.MouseDown:
        {
            if (@event.button == 0)
            {
                UIUnityEvents.TextClickDown(camera, this, @event, this.label);
            }
            return;
        }

        case EventType.MouseUp:
        {
            if (@event.button != 0)
            {
                Debug.Log("Wee");
            }
            else
            {
                UIUnityEvents.TextClickUp(camera, this, @event, this.label);
            }
            return;
        }

        case EventType.MouseMove:
        {
            return;
        }

        case EventType.MouseDrag:
        {
            if (@event.button == 0)
            {
                UIUnityEvents.TextDrag(camera, this, @event, this.label);
            }
            return;
        }

        case EventType.KeyDown:
        {
            UIUnityEvents.TextKeyDown(camera, this, @event, this.label);
            return;
        }

        case EventType.KeyUp:
        {
            UIUnityEvents.TextKeyUp(camera, this, @event, this.label);
            return;
        }

        default:
        {
            return;
        }
        }
    }
Exemple #2
0
    internal void OnEvent(UICamera camera, NGUIHack.Event @event, EventType type)
    {
        switch (type)
        {
        case EventType.MouseDown:
            if (@event.button == 0)
            {
                UIUnityEvents.TextClickDown(camera, this, @event, this.label);
            }
            break;

        case EventType.MouseUp:
            if (@event.button != 0)
            {
                Debug.Log("Wee");
                break;
            }
            UIUnityEvents.TextClickUp(camera, this, @event, this.label);
            break;

        case EventType.MouseDrag:
            if (@event.button == 0)
            {
                UIUnityEvents.TextDrag(camera, this, @event, this.label);
            }
            break;

        case EventType.KeyDown:
            UIUnityEvents.TextKeyDown(camera, this, @event, this.label);
            break;

        case EventType.KeyUp:
            UIUnityEvents.TextKeyUp(camera, this, @event, this.label);
            break;
        }
    }
Exemple #3
0
 internal static void TextDrag(UICamera camera, UIInput input, NGUIHack.Event @event, UILabel label)
 {
     UIUnityEvents.TextDrag(camera, input, @event.real, label);
 }