# Bevy Debug Text Overlay [![Bevy tracking](https://img.shields.io/badge/Bevy%20tracking-released%20version-lightblue)](https://github.com/bevyengine/bevy/blob/main/docs/plugins_guidelines.md#main-branch-tracking) [![Latest version](https://img.shields.io/crates/v/bevy_debug_text_overlay.svg)](https://crates.io/crates/bevy_debug_text_overlay) [![Apache 2.0](https://img.shields.io/badge/license-Apache-blue.svg)](./LICENSE) [![Documentation](https://docs.rs/bevy-debug-text-overlay/badge.svg)](https://docs.rs/bevy-debug-text-overlay/) A proof of concept for adding a very convenient text overlay macro to [the bevy game engine](https://bevyengine.org/). This is derived from [the code I used during the first bevy game jam](https://github.com/team-plover/warlocks-gambit/blob/1ea5464717a45ea1ee96c1ab696c2c10d5cb79e8/src/debug_overlay.rs). There are major improvements: most notably the text doesn't jump around all the time, and each message can have its own color. `screen_print!` **is very convenient**, if you are an incorrigible println-debugger, you will love this crate when working with bevy! ## Usage ```toml [dependencies] bevy-debug-text-overlay = "8.1.0" ``` This bevy plugin is fairly trivial to use. You must: 1. Add the `OverlayPlugin` to your app 2. Use the `screen_print!` macro wherever you want, just use it like you would use `println!`, no need to pass special arguments. This will display on the top left of the screen the text for a short time. Please see the [`screen_print!`](https://docs.rs/bevy-debug-text-overlay/latest/bevy_debug_text_overlay/macro.screen_print.html) documentation for detailed usage instructions. ### Code example ```rust,no_run use bevy::prelude::*; use bevy_debug_text_overlay::{screen_print, OverlayPlugin}; fn main() { App::new() // !!!!IMPORTANT!!!! Add the OverlayPlugin here .add_plugins((DefaultPlugins, OverlayPlugin { font_size: 23.0, ..default() })) .add_systems(Startup, setup) .add_systems(Update, screen_print_text) .run(); } fn setup(mut commands: Commands) { commands.spawn(Camera2dBundle::default()); } // Notice how we didn't have to add any special system parameters fn screen_print_text(time: Res