int OnRevert(TLUIElement controller, int revertPos)
 {
     _timeframe.duration = revertPos;
     OnRuntime(controller);
     //that.CheckPassSegment();
     return(0);
 }
                int OnRuntime(TLUIElement controller)
                {
                    if (this._timeframe.duration > this._timeline.length)
                    {
                        this._timeframe.duration += this._timeline.length - this._timeframe.duration;
                    }

                    //_time.setValue(_timeframe.duration + "sec/ms")

                    controller.proxy[0] = this.seek.position = (float)((float)this._timeframe.duration / (float)this._timeline.length) /* * 100*/;
                    //controller.proxy[0] = -20 + (this._timeline.gui.span.area.width * this.seek.position) /*+ "%"*/;
                    // assignment moved to timeline.gui//this.gui.timeline_box.width

                    // TO-DO

                    /*
                     * if ((this.seek.position - that.prevSegmentPos) > (that.segmentPos - that.prevSegmentPos)) {
                     *  that.checkPassSegment()
                     * }
                     */

                    //that.Update();

                    return(0);
                }
            public static void OnPass(TLUIElement controller, object _pass, Func <object, int> Func)
            {
                _pass = _pass.GetMember("onpass", new Pass(), false);
                if (_pass == null)
                {
                    return;
                }
                Pass pass = _pass as Pass;

                pass.Calls[pass.Length] = () => { return(Func(controller)); };
                pass.Length++;
            }
            public static void OnRevert(TLUIElement controller, object _revert, Func <TLUIElement, int, int> Func)
            {
                _revert = _revert.GetMember("onrevert", new Revert(), false);
                if (_revert == null)
                {
                    return;
                }
                Revert revert = _revert as Revert;

                revert.Calls[revert.Length] = (int count) => { return(Func(controller, count)); };
                revert.Length++;
            }
            public static void OnRuntime(TLUIElement controller, object _runtime, Func <TLUIElement, int> Func)
            {
                _runtime = _runtime.GetMember("onruntime", new Runtime(), false);
                if (_runtime == null)
                {
                    return;
                }
                Runtime runtime = _runtime as Runtime;

                runtime.Calls[runtime.Length] = () => { return(Func(controller)); };
                runtime.Length++;
            }
            public static void OnUpdate(TLUIElement controller, object _update, Func <object, int> Func)
            {
                _update = _update.GetMember("onupdate", new Update(), false);
                if (_update == null)
                {
                    return;
                }
                Update update = _update as Update;

                update.Calls[update.Length] = () => { return(Func(controller)); };
                update.Length++;
            }
            public static void OnReady(TLUIElement controller, object _ready, Func <object, int> Func)
            {
                _ready = _ready.GetMember("onready", new Ready(), false);
                if (_ready == null)
                {
                    return;
                }
                Ready ready = _ready as Ready;

                ready.Calls[ready.Length] = () => { return(Func(controller)); };
                ready.Length++;
            }
            public static void OnInit(TLUIElement controller, object _init, Func <object, int> Func)
            {
                _init = _init.GetMember("oninit", new Init(), false);
                if (_init == null)
                {
                    return;
                }
                Init init = _init as Init;

                init.Calls[init.Length] = () => { return(Func(controller)); };
                init.Length++;
            }
Beispiel #9
0
                    public void Init(Timeline timeline)
                    {
                        this._timeline = timeline;
                        this._gui      = timeline.gui;
                        this._element  = timeline.gui.element;
                        this._span     = timeline.gui.span;
                        this._scrubber = timeline.gui.scrubber;
                        this._info     = timeline.gui.info;
                        this._slider   = timeline.gui.slider;

                        TimelineCode.Log("(" + this._timeline.name + ") : Init Timeframe Control Seek");
                    }