Make Memory::has_focus public (again)

This commit is contained in:
Emil Ernerfeldt
2021-04-15 10:31:24 +02:00
parent d6de19b507
commit b187d1c576
2 changed files with 5 additions and 1 deletions
+2 -1
View File
@@ -296,7 +296,8 @@ impl Memory {
!self.had_focus_last_frame(id) && self.has_focus(id)
}
pub(crate) fn has_focus(&self, id: Id) -> bool {
/// Does this widget have keybaord focus?
pub fn has_focus(&self, id: Id) -> bool {
self.interaction.focus.id == Some(id)
}