Ejemplo n.º 1
0
        /// <summary>
        /// Draw a single track item
        /// </summary>
        /// <param name="drawArea">The area to draw upon</param>
        /// <param name="colors">The colorscheme to use</param>
        /// <param name="drawAlways">Do we need to draw anyway, independent of settings?</param>
        internal override bool Draw(DrawArea drawArea, ColorScheme colors, bool drawAlways)
        {
            bool returnValue;

            returnValue = false;
            if (Properties.Settings.Default.showPlatformMarkers || drawAlways)
            {
                float size         = 9f; // in meters
                int   minPixelSize = 7;
                drawArea.DrawTexture(this.WorldLocation, "platform" + colors.NameExtension, size, minPixelSize);
                returnValue = true;
            }
            if (Properties.Settings.Default.showPlatformNames)
            {
                drawArea.DrawExpandingString(this.WorldLocation, this.itemName);
                returnValue = true;
            }
            if (Properties.Settings.Default.showStationNames ||
                (drawAlways && !Properties.Settings.Default.showPlatformNames))
            {   // if drawAlways and no station nor platform name requested, then also show station
                drawArea.DrawExpandingString(this.WorldLocation, this.stationName);
                returnValue = true;
            }

            return(returnValue);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Draw a single track item
        /// </summary>
        /// <param name="drawArea">The area to draw upon</param>
        /// <param name="colors">The colorscheme to use</param>
        /// <param name="drawAlways">Do we need to draw anyway, independent of settings?</param>
        internal override bool Draw(DrawArea drawArea, ColorScheme colors, bool drawAlways)
        {
            bool returnValue;

            returnValue = false;
            if (originalItem.IsLimit && (Properties.Settings.Default.showSpeedLimits || drawAlways))
            {
                drawArea.DrawTexture(this.WorldLocation, "disc", 6f, 0, colors.Speedpost);
                string speed = originalItem.Distance.ToString(System.Globalization.CultureInfo.CurrentCulture);
                drawArea.DrawExpandingString(this.WorldLocation, speed);
                returnValue = true;
            }
            if (originalItem.IsMilePost && (Properties.Settings.Default.showMileposts || drawAlways))
            {
                drawArea.DrawTexture(this.WorldLocation, "disc", 6f, 0, colors.Speedpost);
                string distance = originalItem.Distance.ToString(System.Globalization.CultureInfo.CurrentCulture);
                drawArea.DrawExpandingString(this.WorldLocation, distance);
                returnValue = true;
            }

            return(returnValue);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Draw a single track item
        /// </summary>
        /// <param name="drawArea">The area to draw upon</param>
        /// <param name="colors">The colorscheme to use</param>
        /// <param name="drawAlways">Do we need to draw anyway, independent of settings?</param>
        internal override bool Draw(DrawArea drawArea, ColorScheme colors, bool drawAlways)
        {
            bool returnValue;

            returnValue = false;
            if (Properties.Settings.Default.showSidingMarkers || drawAlways)
            {
                drawArea.DrawTexture(this.WorldLocation, "disc", 6f, 0, colors.Siding);
                returnValue = true;
            }
            if (Properties.Settings.Default.showSidingNames || drawAlways)
            {
                drawArea.DrawExpandingString(this.WorldLocation, this.itemName);
                returnValue = true;
            }
            return(returnValue);
        }