Beispiel #1
0
        public void Call(Type type, Button target)
        {
            ButtonEventHandlerList list = null;

            switch (type)
            {
            case Type.LOAD: list = load; break;

            case Type.UNLOAD: list = unload; break;

            case Type.ENTERFRAME: list = enterFrame; break;

            case Type.UPDATE: list = update; break;

            case Type.RENDER: list = render; break;

            case Type.PRESS: list = press; break;

            case Type.RELEASE: list = release; break;

            case Type.ROLLOVER: list = rollOver; break;

            case Type.ROLLOUT: list = rollOut; break;
            }
            if (list != null)
            {
                list = new ButtonEventHandlerList(list);
                list.ForEach(h => h(target));
            }
        }
	public ButtonEventHandlers()
	{
		load = new ButtonEventHandlerList();
		unload = new ButtonEventHandlerList();
		enterFrame = new ButtonEventHandlerList();
		update = new ButtonEventHandlerList();
		render = new ButtonEventHandlerList();
		press = new ButtonEventHandlerList();
		release = new ButtonEventHandlerList();
		rollOver = new ButtonEventHandlerList();
		rollOut = new ButtonEventHandlerList();
		keyPress = new ButtonKeyPressHandlerList();
	}
Beispiel #3
0
 public ButtonEventHandlers()
 {
     load       = new ButtonEventHandlerList();
     unload     = new ButtonEventHandlerList();
     enterFrame = new ButtonEventHandlerList();
     update     = new ButtonEventHandlerList();
     render     = new ButtonEventHandlerList();
     press      = new ButtonEventHandlerList();
     release    = new ButtonEventHandlerList();
     rollOver   = new ButtonEventHandlerList();
     rollOut    = new ButtonEventHandlerList();
     keyPress   = new ButtonKeyPressHandlerList();
 }
	public void Call(Type type, Button target)
	{
		ButtonEventHandlerList list = null; 
		switch (type) {
		case Type.LOAD: list = load; break;
		case Type.UNLOAD: list = unload; break;
		case Type.ENTERFRAME: list = enterFrame; break;
		case Type.UPDATE: list = update; break;
		case Type.RENDER: list = render; break;
		case Type.PRESS: list = press; break;
		case Type.RELEASE: list = release; break;
		case Type.ROLLOVER: list = rollOver; break;
		case Type.ROLLOUT: list = rollOut; break;
		}
		if (list != null) {
			list = new ButtonEventHandlerList(list);
			list.ForEach(h => h(target));
		}
	}