示例#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 override void Exec(int matrixId = 0, int colorTransformId = 0)
        {
            base.Exec(matrixId, colorTransformId);

            if (m_handler != null)
            {
                m_handler.Call(EventType.ENTERFRAME, this);
            }
        }
示例#3
0
        public override void Update(Matrix m, ColorTransform c)
        {
            base.Update(m, c);

            if (m_handler != null)
            {
                m_handler.Call(EventType.UPDATE, this);
            }
        }
示例#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;
            }

            m_handler = lwf.GetButtonEventHandlers(this);
            if (m_handler != null)
            m_handler.Call(EventType.LOAD, this);
        }