Can't interact with widgets added to layers other than Background
- Dominant language
- Rust
- Stars
- 30.6k
- Forks
- 2.1k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 72
Description
just change the egui_template code into:
```rs
ui.with_layer_id(egui::LayerId::new(egui::Order::Middle, egui::Id::new("mid")), |ui| {
ui.add(egui::Slider::new(value, 0.0..=10.0).text("value"));
if ui.button("Increment").clicked() {
*value += 1.0;
}
});
```
and the widgets couldn't be interacted with any more. I suppose interactions are allowed in other layers because `egui::LayerId::allow_interaction` returns true? No more info could be found in the doc. It seems to be a bug.
Contributor guide
Research direction
Start by reproducing the provided egui_template example with a widget in a Middle layer, then inspect LayerId::allow_interaction and the surrounding input-handling code. Done means the slider and Increment button remain interactive outside the Background layer, with a regression test or example demonstrating the behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100