recursive widget #917
-
I'm trying to make widget to show filesystem directory structure. So I have a widget that would consits same child widgets. I made it. But I cant understand how to interact with one. As you can see on the picture, I hovered one element but all parents interact too. Is it possible to substract some rect from interaction rect or stop propagintaion of response? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
ok, I found it. I just check, if children response.hovered is false, then react to response in widget. But with click I still have problem |
Beta Was this translation helpful? Give feedback.
-
ok, I solve it. if depth > 0 {
May be it isn't best way, but it works |
Beta Was this translation helpful? Give feedback.
ok, I solve it.
if depth > 0 {
let child_rect = rect.shrink2(egui::vec2(200.0, 50.0));
May be it isn't best way, but it works