예제 #1
0
        public Button(LWF lwf, Movie parent, int objId, int instId,
                      int matrixId = -1, int colorTransformId = -1)
            : base(lwf, parent, Format.Object.Type.BUTTON, objId, instId)
        {
            m_matrixId         = matrixId;
            m_colorTransformId = colorTransformId;

            m_invert = new Matrix();
            m_hitX   = Int32.MinValue;
            m_hitY   = Int32.MinValue;

            if (objId >= 0)
            {
                m_data         = lwf.data.buttons[objId];
                m_dataMatrixId = m_data.matrixId;
            }

            ButtonEventHandlers handler = lwf.GetButtonEventHandlers(this);

            if (handler != null)
            {
                m_handler = new ButtonEventHandlers();
                m_handler.Add(handler);
                m_handler.Call(EventType.LOAD, this);
            }
        }
예제 #2
0
 public void SetHandlers(ButtonEventHandlers handler)
 {
     if (m_handler != null)
     {
         m_handler.Add(handler);
     }
     else
     {
         m_handler = handler;
     }
 }
예제 #3
0
 public void SetHandlers(ButtonEventHandlers handler)
 {
     if (m_handler == null)
     {
         m_handler = new ButtonEventHandlers();
     }
     else
     {
         m_handler.Clear();
     }
     m_handler.Add(handler);
 }
예제 #4
0
	public Button(LWF lwf, Movie parent, int objId, int instId,
			int matrixId = -1, int colorTransformId = -1)
		: base(lwf, parent, Format.Object.Type.BUTTON, objId, instId)
	{
		m_matrixId = matrixId;
		m_colorTransformId = colorTransformId;

		m_invert = new Matrix();
		m_hitX = Int32.MinValue;
		m_hitY = Int32.MinValue;

		if (objId >= 0) {
			m_data = lwf.data.buttons[objId];
			m_dataMatrixId = m_data.matrixId;
		}

		ButtonEventHandlers handler = lwf.GetButtonEventHandlers(this);
		if (handler != null) {
			m_handler = new ButtonEventHandlers();
			m_handler.Add(handler);
			m_handler.Call(EventType.LOAD, this);
		}
	}