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

IdSalt (WIP)

This commit is contained in:
lucasmerlin
2026-03-23 13:01:51 +01:00
parent ad510257de
commit 0686107840
14 changed files with 136 additions and 40 deletions

View File

@@ -275,7 +275,7 @@ impl<'a> TableBuilder<'a> {
/// This is required if you have multiple tables in the same [`Ui`].
#[inline]
#[deprecated = "Renamed id_salt"]
pub fn id_source(self, id_salt: impl std::hash::Hash) -> Self {
pub fn id_source(self, id_salt: impl Into<egui::IdSalt>) -> Self {
self.id_salt(id_salt)
}
@@ -283,8 +283,8 @@ impl<'a> TableBuilder<'a> {
///
/// This is required if you have multiple tables in the same [`Ui`].
#[inline]
pub fn id_salt(mut self, id_salt: impl std::hash::Hash) -> Self {
self.id_salt = Id::new(id_salt);
pub fn id_salt(mut self, id_salt: impl Into<egui::IdSalt>) -> Self {
self.id_salt = id_salt.into().id();
self
}