コード例 #1
0
 public DurationControl(int x, int y, IKeyFramesOrderer keyFramesOrderer)
 {
     _keyFramesOrderer = keyFramesOrderer;
     _subtractButton = new TextButton("-", x, y) { Click = Subtract };
     _addButton = new TextButton("+", x + 30, y) { Click = Add };
     _durationPosition = new Vector2(x + 15, y);
     _text = DependencyInjection.Resolve<IText>();
 }
コード例 #2
0
 public DurationControl(int x, int y, IKeyFramesOrderer keyFramesOrderer)
 {
     _keyFramesOrderer = keyFramesOrderer;
     _subtractButton   = new TextButton("-", x, y)
     {
         Click = Subtract
     };
     _addButton = new TextButton("+", x + 30, y)
     {
         Click = Add
     };
     _durationPosition = new Vector2(x + 15, y);
     _text             = DependencyInjection.Resolve <IText>();
 }
コード例 #3
0
        public DurationControls(int x, int y, int yIncrement, IKeyFramesScroll keyFramesScroll, IKeyFramesOrderer keyFramesOrderer)
        {
            _keyFramesScroll = keyFramesScroll;
            _settings = DependencyInjection.Resolve<IReadOnlySettings>();
            _durationControls = new DurationControl[_keyFramesScroll.Limit];
            var definitionsLoader = DependencyInjection.Resolve<IDefinitionsLoader>();

            for (var i = 0; i < _durationControls.Length; i++)
                _durationControls[i] = new DurationControl(x, y + (i * yIncrement), keyFramesOrderer);

            _settings.SelectedAnimationChanged += UpdateControls;
            _settings.SelectedAnimation.KeyFramesChanged += UpdateControls;
            _keyFramesScroll.ScrollIndexChanged += UpdateControls;
            definitionsLoader.DefinitionsLoaded += UpdateControls;
            UpdateControls();
        }
コード例 #4
0
        public DurationControls(int x, int y, int yIncrement, IKeyFramesScroll keyFramesScroll, IKeyFramesOrderer keyFramesOrderer)
        {
            _keyFramesScroll  = keyFramesScroll;
            _settings         = DependencyInjection.Resolve <IReadOnlySettings>();
            _durationControls = new DurationControl[_keyFramesScroll.Limit];
            var definitionsLoader = DependencyInjection.Resolve <IDefinitionsLoader>();

            for (var i = 0; i < _durationControls.Length; i++)
            {
                _durationControls[i] = new DurationControl(x, y + (i * yIncrement), keyFramesOrderer);
            }

            _settings.SelectedAnimationChanged           += UpdateControls;
            _settings.SelectedAnimation.KeyFramesChanged += UpdateControls;
            _keyFramesScroll.ScrollIndexChanged          += UpdateControls;
            definitionsLoader.DefinitionsLoaded          += UpdateControls;
            UpdateControls();
        }