Example #1
0
        /// <summary>
        ///     Renders the object.
        /// </summary>
        /// <param name="renderer">The Renderer.</param>
        public void Render(RenderDevice renderer)
        {
            Vector2 dim = renderer.MeasureString(Score.ToString(CultureInfo.InvariantCulture), _font);

            renderer.DrawString(Score.ToString(CultureInfo.InvariantCulture), _font, new Vector2(320 - (dim.X / 2), 50),
                                Color.White);
        }
Example #2
0
        /// <summary>
        ///     Renders the object.
        /// </summary>
        /// <param name="renderer">The Renderer.</param>
        public void Render(RenderDevice renderer)
        {
            if (!Visible) return;

            if (!InstructionFlag)
            {
                renderer.DrawTexture(_texture, _position, _opacity);
                Vector2 dim = renderer.MeasureString(Instruction, _font);
                renderer.DrawString(Instruction, _font, new Vector2(_position.X - dim.X/2 + 28, _position.Y - 30),
                    Color.White);
            }
            else
            {
                renderer.DrawTexture(_texture, _position, _opacity);
                Vector2 dim = renderer.MeasureString(Instruction2, _font);
                renderer.DrawString(Instruction2, _font, new Vector2(_position.X - dim.X/2 + 28, _position.Y - 30),
                    Color.White);
            }
        }
Example #3
0
        /// <summary>
        ///     Renders the object.
        /// </summary>
        /// <param name="renderer">The Renderer.</param>
        public void Render(RenderDevice renderer)
        {
            if (!Visible)
            {
                return;
            }

            if (!InstructionFlag)
            {
                renderer.DrawTexture(_texture, _position, _opacity);
                Vector2 dim = renderer.MeasureString(Instruction, _font);
                renderer.DrawString(Instruction, _font, new Vector2(_position.X - dim.X / 2 + 28, _position.Y - 30),
                                    Color.White);
            }
            else
            {
                renderer.DrawTexture(_texture, _position, _opacity);
                Vector2 dim = renderer.MeasureString(Instruction2, _font);
                renderer.DrawString(Instruction2, _font, new Vector2(_position.X - dim.X / 2 + 28, _position.Y - 30),
                                    Color.White);
            }
        }
Example #4
0
 /// <summary>
 ///     Renders the object.
 /// </summary>
 /// <param name="renderer">The Renderer.</param>
 public void Render(RenderDevice renderer)
 {
     Vector2 dim = renderer.MeasureString(Score.ToString(CultureInfo.InvariantCulture), _font);
     renderer.DrawString(Score.ToString(CultureInfo.InvariantCulture), _font, new Vector2(320 - (dim.X/2), 50),
         Color.White);
 }
Example #5
0
 /// <summary>
 ///     Draws the renderhint.
 /// </summary>
 /// <param name="renderer">The Renderer.</param>
 private void DrawRenderHint(RenderDevice renderer)
 {
     renderer.DrawString(_deviceHint, _font, _deviceHintPosition, Color.Black);
 }
Example #6
0
 /// <summary>
 ///     Draws the renderhint.
 /// </summary>
 /// <param name="renderer">The Renderer.</param>
 private void DrawRenderHint(RenderDevice renderer)
 {
     renderer.DrawString(_deviceHint, _font, _deviceHintPosition, Color.Black);
 }