1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 14:49:06 -04:00

Pass in an explicit id in UiBuilder, to avoid wrapping passed in ids with Id::new() (#7925)

I was really confused why I couldn't find the response for my ui with
explicit id. Turns out the id I passed in was wrapped by `Id::new`
This commit is contained in:
Lucas Meurer
2026-02-24 11:07:55 +01:00
committed by GitHub
parent 08f3fd2dc1
commit e0bac4e260

View File

@@ -54,8 +54,8 @@ impl UiBuilder {
///
/// This is a shortcut for `.id_salt(my_id).global_scope(true)`.
#[inline]
pub fn id(mut self, id: impl Hash) -> Self {
self.id_salt = Some(Id::new(id));
pub fn id(mut self, id: Id) -> Self {
self.id_salt = Some(id);
self.global_scope = true;
self
}