mvlabat / bevy_egui

This crate provides an Egui integration for the Bevy game engine. 🇺🇦 Please support the Ukrainian army: https://savelife.in.ua/en/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How do you stop a click registering in bevy when I click on egui?

velllu opened this issue · comments

commented

I have a painting app, but when I click the bevy ui, it also paints the pixel "behind" egui. How can I prevent this?

!egui_ctx.single_mut().get_mut().is_pointer_over_area() as a condition is what I use and it works well.

@opfromthestart
I used bevy_transform_gizmo to move object in bevy, and wanted to stop a click in bevy when I click on egui. Using egui_ctx.single_mut().get_mut().is_pointer_over_area(), I get a condition mouse on ui, but I don't know how to stop a click. Can you help me?

Hey @FVellu, sorry for the delayed answer. I'll close the issue as a duplicate of #47. Basically, the discussion there mentions the same workaround that @opfromthestart brought up, and that issue is also tracking a finer solution that depends on (yet to be made) changes to Bevy.