public AnimationNameEditor(IAnimationSelector animationSelector, IAnimationsScroll animationsScroll, int x, int y)
            : base(x, y)
        {
            _animationSelector = animationSelector;
            _animationsScroll = animationsScroll;
            _settings = DependencyInjection.Resolve<ISettings>();
            var definitionsLoader = DependencyInjection.Resolve<IDefinitionsLoader>();

            UpdateFocus();
            _settings.SelectedAnimationChanged += UpdateFocus;
            _animationsScroll.ScrollIndexChanged += UpdateVisibility;
            _animationsScroll.ScrollIndexChanged += UpdatePosition;
            definitionsLoader.DefinitionsLoaded += UpdateText;
            Change = v => _settings.SelectedAnimation.Name = v;
        }
        public AnimationNameEditor(IAnimationSelector animationSelector, IAnimationsScroll animationsScroll, int x, int y)
            : base(x, y)
        {
            _animationSelector = animationSelector;
            _animationsScroll  = animationsScroll;
            _settings          = DependencyInjection.Resolve <ISettings>();
            var definitionsLoader = DependencyInjection.Resolve <IDefinitionsLoader>();

            UpdateFocus();
            _settings.SelectedAnimationChanged   += UpdateFocus;
            _animationsScroll.ScrollIndexChanged += UpdateVisibility;
            _animationsScroll.ScrollIndexChanged += UpdatePosition;
            definitionsLoader.DefinitionsLoaded  += UpdateText;
            Change = v => _settings.SelectedAnimation.Name = v;
        }
        public AnimationSelector(int x, int y, int yIncrement, IAnimationsScroll animationsScroll)
        {
            _animationsScroll    = animationsScroll;
            _settings            = DependencyInjection.Resolve <ISettings>();
            _characterDefinition = DependencyInjection.Resolve <CharacterDefinition>();
            _options             = new TextButtonOption[_animationsScroll.Limit];
            var definitionsLoader = DependencyInjection.Resolve <IDefinitionsLoader>();

            for (var i = 0; i < _options.Length; i++)
            {
                _options[i] = AddOption(i, GetAnimationText(i), new Vector2(x, y + i * yIncrement));
            }

            SelectedValue = _settings.SelectedAnimationIndex;
            Change        = ValueChange;
            _animationsScroll.ScrollIndexChanged    += UpdateOptions;
            _settings.SelectedAnimationIndexChanged += UpdateAnimationWithoutName;
            definitionsLoader.DefinitionsLoaded     += UpdateOptions;
        }