{"id":23695579,"url":"https://github.com/ickshonpe/bevy-ui-debug-overlay","last_synced_at":"2025-04-11T12:11:27.435Z","repository":{"id":269412855,"uuid":"907317992","full_name":"ickshonpe/bevy-ui-debug-overlay","owner":"ickshonpe","description":"Improved debug overlay for Bevy UI","archived":false,"fork":false,"pushed_at":"2025-01-02T13:07:00.000Z","size":305,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T08:38:10.227Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ickshonpe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-23T10:11:18.000Z","updated_at":"2025-01-02T13:07:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"25ed8f19-e7d0-44c1-915d-7ef00fe3852b","html_url":"https://github.com/ickshonpe/bevy-ui-debug-overlay","commit_stats":null,"previous_names":["ickshonpe/bevy-ui-debug-overlay"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ickshonpe%2Fbevy-ui-debug-overlay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ickshonpe%2Fbevy-ui-debug-overlay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ickshonpe%2Fbevy-ui-debug-overlay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ickshonpe%2Fbevy-ui-debug-overlay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ickshonpe","download_url":"https://codeload.github.com/ickshonpe/bevy-ui-debug-overlay/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248388100,"owners_count":21095336,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-30T05:54:59.365Z","updated_at":"2025-04-11T12:11:27.407Z","avatar_url":"https://github.com/ickshonpe.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bevy-ui-debug-overlay\n\nImproved UI debug overlay for Bevy 0.15. \nSimpler, more efficient, and easier to use than the built-in `bevy_dev_tools::ui_debug_overlay`.\n* Supports multiple windows and UI rendered to texture.\n* Supports UI scale factor correctly.\n* Draws rounded debug rects for rounded UI nodes.\n\n![Debug Overlay](debug_overlay.png)\n### Usage\n\nAdd the dependency to your project's `cargo.toml`:\n```\nbevy-ui-debug-overlay = \"0.2\"\n```\n\nAdd the plugin to your bevy project :\n```\n// From the included `debug_overlay.rs` example\nfn main() {\n    App::new()\n        .add_plugins((\n            DefaultPlugins,\n            UiDebugOverlayPlugin::start_enabled().with_line_width(2.),\n        ))\n        .add_systems(Startup, (setup, debug_overlay_setup))\n        .add_systems(Update, (update_scroll_position, toggle_debug_overlay))\n        .run();\n}\n```\n\nThe debug overlay is controlled using the `UiDebugOverlay` resource:\n```\nfn toggle_debug_overlay(\n    input: Res\u003cButtonInput\u003cKeyCode\u003e\u003e,\n    mut debug_overlay: ResMut\u003cUiDebugOverlay\u003e,\n    mut root_node_query: Query\u003c\u0026mut Visibility, (With\u003cNode\u003e, Without\u003cParent\u003e)\u003e,\n) {\n    if input.just_pressed(KeyCode::Space) {\n        // The toggle method will enable the debug overlay if disabled and disable if enabled\n        debug_overlay.toggle();\n    }\n\n    if input.just_pressed(KeyCode::KeyS) {\n        // Toggle debug outlines for nodes with `ViewVisibility` set to false.\n        debug_overlay.show_hidden = !debug_overlay.show_hidden;\n    }\n\n    if input.just_pressed(KeyCode::KeyC) {\n        // Toggle outlines for clipped UI nodes.\n        debug_overlay.show_clipped = !debug_overlay.show_clipped;\n    }\n\n    if input.just_pressed(KeyCode::KeyV) {\n        for mut visibility in root_node_query.iter_mut() {\n            // Toggle the UI root node's visibility\n            visibility.toggle_inherited_hidden();\n        }\n    }\n}\n```\n\nYou can also use `UiDebugOverlay` to set the overlay's line width:\n```\n    debug_overlay.line_width = 2.;\n```\n\n### Example\nTo run the example use:\n```\ncargo run --example debug_overlay\n```\nThe keys to control the example's debug overlay are on listed on the left side panel.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fickshonpe%2Fbevy-ui-debug-overlay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fickshonpe%2Fbevy-ui-debug-overlay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fickshonpe%2Fbevy-ui-debug-overlay/lists"}