Beispiel #1
0
        public RaceLabels(RaceComponent component, int index, RaceSettings settings, RaceSplit split)
        {
            Parent         = component;
            RaceIndex      = index;
            Split          = split;
            Settings       = settings;
            MinimumHeight  = 10;
            VerticalHeight = 31;

            TimeFormatter      = new RegularSplitTimeFormatter(Settings.Accuracy);
            DeltaTimeFormatter = new DeltaSplitTimeFormatter(Settings.Accuracy, false);

            Cache     = new GraphicsCache();
            RacerName = new SimpleLabel()
            {
                HorizontalAlignment = StringAlignment.Near,
                VerticalAlignment   = StringAlignment.Near
            };
            RacerSplit = new SimpleLabel()
            {
                HorizontalAlignment = StringAlignment.Near,
                VerticalAlignment   = StringAlignment.Far
            };
            RacerTime = new SimpleLabel()
            {
                HorizontalAlignment = StringAlignment.Far,
                VerticalAlignment   = StringAlignment.Far
            };
            RacerDelta = new SimpleLabel()
            {
                HorizontalAlignment = StringAlignment.Far,
                VerticalAlignment   = StringAlignment.Near
            };
        }
Beispiel #2
0
        public RaceComponent(LiveSplitState state)
        {
            Settings          = new RaceSettings();
            Comparison        = new RaceSplit();
            InternalComponent = new ComponentRendererComponent();
            InternalComponent.VisibleComponents = Components;

            CurrentState = state;
        }