Exemplo n.º 1
0
        public ItemTrackerComponent(LiveSplitState state, AutoCounterComponentSettings settings, ItemTracker item)
        {
            CurrentState = state;
            Settings     = settings;
            Item         = item;
            Cache        = new GraphicsCache();

            NameLabel = new SimpleLabel()
            {
                HorizontalAlignment = StringAlignment.Near
            };
            CountLabel = new SimpleLabel()
            {
                HorizontalAlignment = StringAlignment.Far
            };
            GoalLabel = new SimpleLabel()
            {
                HorizontalAlignment = StringAlignment.Far
            };
            LabelsList = new List <SimpleLabel>()
            {
                CountLabel, GoalLabel
            };

            VerticalHeight = 31;

            DisplayIcon = Settings.DisplayIcons;
            ShowGoal    = Settings.ShowGoal;
        }
        public AutoCounterComponent(LiveSplitState state)
        {
            Settings     = new AutoCounterComponentSettings(state);
            CurrentState = state;

            Components        = new List <IComponent>();
            ItemComponents    = new List <ItemTrackerComponent>();
            InternalComponent = new ComponentRendererComponent();
            InternalComponent.VisibleComponents = Components;
            RebuildComponentList();

            Settings.SettingsChanged += Settings_SettingsChanged;
        }