Exemple #1
0
        public ObjectAnimView(string path, Timelines.ObjectAnimTimelineDocument doc)
        {
            InitializeComponent();
            if (path != null)
            {
                Text = System.IO.Path.GetFileName(path);
            }
            else
            {
                Text = "New Object Animation".Localize();
            }
            paletteTree      = new TreeControl();
            paletteTree.Dock = DockStyle.Fill;
            subSplitter.Panel1.Controls.Add(paletteTree);

            timeline      = new Sce.Atf.Controls.Timelines.Direct2D.D2dTimelineControl(doc);
            timeline.Dock = DockStyle.Fill;
            subSplitter.Panel2.Controls.Add(timeline);
            new D2dSelectionManipulator(timeline);
            new D2dMoveManipulator(timeline);
            new D2dScaleManipulator(timeline);
            splitManipulator = new D2dSplitManipulator(timeline);
            D2dSnapManipulator     snapManipulator     = new D2dSnapManipulator(timeline);
            D2dScrubberManipulator scrubberManipulator = new D2dScrubberManipulator(timeline);

            //// Allow the snap manipulator to snap objects to the scrubber.
            snapManipulator.Scrubber = scrubberManipulator;

            Urho3D      = new UrhoBackend.UrControl("Data/Scripts/ObjectAnimEditor.as");
            Urho3D.Dock = DockStyle.Fill;
            Urho3D.SubscribeCallback(this);
            topSplitter.Panel1.Controls.Add(Urho3D);
        }
Exemple #2
0
        /// <summary>
        /// Attaches manipulators to the TimelineControl to provide additional capabilities.
        /// Order of adding manipulators matters.</summary>
        protected virtual void AttachManipulators()
        {
            // The order here determines the order of receiving Paint events and is the reverse
            //  order of receiving picking events. For example, a custom Control that is drawn
            //  on top of everything else and that can be clicked on should come last in this
            //  list so that it is drawn last and is picked first.
            new D2dSelectionManipulator(m_timelineControl);
            new D2dMoveManipulator(m_timelineControl);
            new D2dScaleManipulator(m_timelineControl);
            m_splitManipulator = new D2dSplitManipulator(m_timelineControl);
            D2dSnapManipulator snapManipulator = new D2dSnapManipulator(m_timelineControl);

            m_scrubberManipulator = new D2dScrubberManipulator(m_timelineControl);

            //// Allow the snap manipulator to snap objects to the scrubber.
            snapManipulator.Scrubber = m_scrubberManipulator;

            D2dScrubberManipulator.Moved += D2dScrubberManipulator_Moved;
        }
Exemple #3
0
        private void D2dScrubberManipulator_Moved(object sender, EventArgs e)
        {
            D2dScrubberManipulator d2DScrubberManipulator = sender as D2dScrubberManipulator;

            Console.WriteLine(d2DScrubberManipulator.Position);
        }