{"id":21985566,"url":"https://github.com/ickshonpe/bevy_ui_pointer_capture_detector","last_synced_at":"2025-08-10T10:05:24.359Z","repository":{"id":62444650,"uuid":"503150152","full_name":"ickshonpe/bevy_ui_pointer_capture_detector","owner":"ickshonpe","description":"detects when the pointer is over Bevy UI nodes","archived":false,"fork":false,"pushed_at":"2023-03-06T13:00:28.000Z","size":211,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-05T09:04:17.875Z","etag":null,"topics":["bevy","ui"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","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":"LICENSE","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":"2022-06-13T23:56:41.000Z","updated_at":"2023-06-30T04:46:40.000Z","dependencies_parsed_at":"2024-11-16T18:34:40.265Z","dependency_job_id":null,"html_url":"https://github.com/ickshonpe/bevy_ui_pointer_capture_detector","commit_stats":{"total_commits":10,"total_committers":1,"mean_commits":10.0,"dds":0.0,"last_synced_commit":"1b2d3da71feac26fadbb2bfa21bd6d76b89d6247"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ickshonpe/bevy_ui_pointer_capture_detector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ickshonpe%2Fbevy_ui_pointer_capture_detector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ickshonpe%2Fbevy_ui_pointer_capture_detector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ickshonpe%2Fbevy_ui_pointer_capture_detector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ickshonpe%2Fbevy_ui_pointer_capture_detector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ickshonpe","download_url":"https://codeload.github.com/ickshonpe/bevy_ui_pointer_capture_detector/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ickshonpe%2Fbevy_ui_pointer_capture_detector/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269706664,"owners_count":24462208,"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","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bevy","ui"],"created_at":"2024-11-29T18:14:03.855Z","updated_at":"2025-08-10T10:05:24.329Z","avatar_url":"https://github.com/ickshonpe.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bevy_ui_pointer_capture_detector\n\nA plugin that detects if the mouse pointer is above a Bevy Ui Node.\n* supports Bevy 0.9\n\n## Usage\n\nIn your ```Cargo.toml``` ```[dependencies]``` section, add \n\n```toml\nbevy_ui_pointer_capture_detector = \"0.3\"\n```\n\nThis example draws a square red UI node. Each update it sets the \ncolor of the background depending on if the mouse pointer is over the red node:\n\n```rust\nuse bevy::prelude::*;\nuse bevy_ui_pointer_capture_detector::*;\n\nfn setup(\n    mut commands: Commands\n) {\n    commands\n        .spawn(Camera2dBundle::default())\n        .commands()\n        .spawn(NodeBundle {\n            style: Style {\n                margin: UiRect { \n                    left: Val::Px(100.0), \n                    bottom: Val::Px(100.0), \n                    right: Val::Auto, \n                    top: Val::Auto \n                },\n                size: Size { \n                    width: Val::Px(100.0), \n                    height: Val::Px(100.0) \n                },\n                ..Default::default()\n            },\n            background_color: BackgroundColor(Color::RED),\n            ..Default::default()\n        });\n}\n\nfn is_pointer_captured(\n    capture: Res\u003cUiPointerCaptureStatus\u003e,\n    mut clear_color: ResMut\u003cClearColor\u003e,\n) {\n    clear_color.0 = if capture.is_captured() {\n            Color::DARK_GRAY\n        } else {\n            Color::WHITE\n        };\n}\n\nfn main() {\n    App::new()\n        .add_plugins(DefaultPlugins)\n        .add_plugin(BevyUiPointerCaptureDetectorPlugin)\n        .add_startup_system(setup)\n        .add_system(is_pointer_captured)\n        .run();\n}\n```\n#\n### Examples\n\n```\ncargo run --example example\ncargo run --example minimal\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fickshonpe%2Fbevy_ui_pointer_capture_detector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fickshonpe%2Fbevy_ui_pointer_capture_detector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fickshonpe%2Fbevy_ui_pointer_capture_detector/lists"}