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>(); }
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>(); }
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(); }
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(); }