1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 14:20:04 -04:00

Only show id clash warnings in debug builds by default (#2930)

Change with `egui_ctx.options_mut(|opt| opt.warn_on_id_clash = true);`
This commit is contained in:
Emil Ernerfeldt
2023-04-19 08:53:37 +02:00
committed by GitHub
parent d486c76a9f
commit b8e798777d
4 changed files with 65 additions and 52 deletions

View File

@@ -48,6 +48,9 @@ impl super::Demo for IdTest {
impl super::View for IdTest {
fn ui(&mut self, ui: &mut egui::Ui) {
// Make sure the warnings are on (by default they are only on in debug builds).
ui.ctx().options_mut(|opt| opt.warn_on_id_clash = true);
ui.heading("Name collision example");
ui.label("\