Exemplo 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);
        }
Exemplo 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)
 {
     if (Properties.Settings.Default.showCrossovers || drawAlways)
     {
         drawArea.DrawTexture(this.WorldLocation, "disc", 3f, 0, colors.EndNode);
         return(true);
     }
     return(false);
 }
Exemplo 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)
 {
     if (Properties.Settings.Default.showSoundRegions || drawAlways)
     {
         float size         = 4f; // in meters
         int   minPixelSize = 5;
         drawArea.DrawTexture(this.WorldLocation, "sound" + colors.NameExtension, size, minPixelSize);
         return(true);
     }
     return(false);
 }
Exemplo n.º 4
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);
        }
Exemplo n.º 5
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)
 {
     if (drawAlways ||
         Properties.Settings.Default.showAllSignals ||
         (Properties.Settings.Default.showSignals && isNormal)
         )
     {
         float size         = 7f; // in meters
         int   minPixelSize = 5;
         drawArea.DrawTexture(this.WorldLocation, "signal" + colors.NameExtension, size, minPixelSize, colors.None, this.angle);
         return(true);
     }
     return(false);
 }
Exemplo n.º 6
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);
        }