Ejemplo n.º 1
0
    public virtual void ClearActions(UIAction a = UIAction.None)
    {
        if (a == UIAction.None)
        {
            Actions_MouseOut.Clear();
            Actions_MouseOver.Clear();
            Actions_MouseUp.Clear();
            Actions_MouseDown.Clear();
            TypeActions_MouseOut.Clear();
            TypeActions_MouseOver.Clear();
            TypeActions_MouseUp.Clear();
            TypeActions_MouseDown.Clear();
        }
        switch (a)
        {
        case UIAction.MouseOut:
            Actions_MouseOut.Clear();
            TypeActions_MouseOut.Clear();
            break;

        case UIAction.MouseOver:
            Actions_MouseOver.Clear();
            TypeActions_MouseOver.Clear();
            break;

        case UIAction.MouseUp:
            Actions_MouseUp.Clear();
            TypeActions_MouseUp.Clear();
            break;

        case UIAction.MouseDown:
            Actions_MouseDown.Clear();
            TypeActions_MouseDown.Clear();
            break;

        case UIAction.MouseClick:
            Actions_MouseClick.Clear();
            TypeActions_MouseClick.Clear();
            break;
        }
    }
Ejemplo n.º 2
0
    public void AddAction(UIAction a, Action func)
    {
        switch (a)
        {
        case UIAction.MouseOut:
            Actions_MouseOut.Add(func);
            break;

        case UIAction.MouseOver:
            Actions_MouseOver.Add(func);
            break;

        case UIAction.MouseUp:
            Actions_MouseUp.Add(func);

            break;

        case UIAction.MouseDown:
            Actions_MouseDown.Add(func);
            break;
        }
    }