public PrintText OffSet()
        {
            PrintText ret = new PrintText(this.Text, this.Position, new SolidBrush(Color.Wheat));

            ret.Position = new Vec2(this.Position.X + 1, this.Position.Y + 1);

            return ret;
        }
Beispiel #2
0
        /// <summary>
        /// Renders the current frame (Text and Renderables)
        /// </summary>
        /// <param name="g"></param>
        public override void Draw(Graphics g)
        {
            /*
            g.InterpolationMode = InterpolationMode.HighQualityBicubic;

            g.SmoothingMode = SmoothingMode.HighQuality;*/

            g.InterpolationMode = InterpolationMode.Low;

            g.SmoothingMode = SmoothingMode.HighSpeed;

            PrintText p;

            if(Globals.DrawTracePath)
                foreach (PrintText text in TracePath)
                {
                    text.OffSet().Render(g);
                    text.Render(g);
                }

            ///Draw stuff
            foreach (Drawable obj in Renderables)
                obj.Render(g);

            //Slap a 'FrameID' in the lower righthand corner
            p = new PrintText("Turns: " + Globals.TurnCount, new Vec2(Globals.Simulator.FrameResolution.X - 90, Globals.Simulator.FrameResolution.Y - 20), Brushes.Black, 8);
            p.Render(g);

            p = new PrintText("Turns: " + Globals.TurnCount, new Vec2(Globals.Simulator.FrameResolution.X - 89, Globals.Simulator.FrameResolution.Y - 19), Brushes.White, 8);
            p.Render(g);
        }