Exemple #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);
            }
        }
Exemple #2
0
 public void SetHandlers(ButtonEventHandlers handler)
 {
     if (m_handler != null)
     {
         m_handler.Add(handler);
     }
     else
     {
         m_handler = handler;
     }
 }
Exemple #3
0
 public void SetHandlers(ButtonEventHandlers handler)
 {
     if (m_handler == null)
     {
         m_handler = new ButtonEventHandlers();
     }
     else
     {
         m_handler.Clear();
     }
     m_handler.Add(handler);
 }
Exemple #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);
		}
	}