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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user