<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using MonoGame.Extended.BitmapFonts;

namespace Citysim.Views
{
    public class DebugView : IView
    {
        public void LoadContent(ContentManager content)
        {
        }

        public void Render(SpriteBatch spriteBatch, Citysim game, GameTime gameTime)
        {
            if (!game.debug)
                return; // Debug mode disabled

            StringBuilder sb = new StringBuilder();
            sb.AppendLine("Citysim " + Citysim.VERSION);
            sb.AppendLine("Map size " + game.city.world.height + "x" + game.city.world.width);
            sb.AppendLine("Camera: " + game.camera.position.X + "," + game.camera.position.Y + " [" + game.camera.speed + "]");

            spriteBatch.DrawString(game.font, sb, new Vector2(10, 10), Color.Black, 0F, new Vector2(0,0), 0.5F, SpriteEffects.None, 1.0F);
        }

        public void Update(Citysim game, GameTime gameTime)
        {
            // F3 toggles debug mode
            if (KeyboardHelper.IsKeyPressed(Keys.F3))
                game.debug = !game.debug;
        }
    }
}<commit_msg>Add absolute mouse position and selected tile debug values to debug screen.<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using MonoGame.Extended.BitmapFonts;

namespace Citysim.Views
{
    public class DebugView : IView
    {
        public void LoadContent(ContentManager content)
        {
        }

        public void Render(SpriteBatch spriteBatch, Citysim game, GameTime gameTime)
        {
            if (!game.debug)
                return; // Debug mode disabled

            StringBuilder sb = new StringBuilder();
            sb.AppendLine("Citysim " + Citysim.VERSION);
            sb.AppendLine("Map size " + game.city.world.height + "x" + game.city.world.width);
            sb.AppendLine("Camera: " + game.camera.position.X + "," + game.camera.position.Y + " [" + game.camera.speed + "]");
            sb.AppendLine("Absolute Mouse Position: " + game.camera.hoveringExact.X + "," + game.camera.hoveringExact.Y);
            sb.AppendLine("Selected Tile: " + game.camera.hovering.X + "," + game.camera.hovering.Y);

            spriteBatch.DrawString(game.font, sb, new Vector2(10, 10), Color.Black, 0F, new Vector2(0,0), 0.5F, SpriteEffects.None, 1.0F);
        }

        public void Update(Citysim game, GameTime gameTime)
        {
            // F3 toggles debug mode
            if (KeyboardHelper.IsKeyPressed(Keys.F3))
                game.debug = !game.debug;
        }
    }
}
{'fraction_non_alphanumeric': 0.11770623742454728, 'fraction_numerical': 0.01006036217303823, 'mean_word_length': 2.5427553444180524, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3484391', 'n_tokens_mistral': 882, 'n_tokens_neox': 866, 'n_words': 190}