1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 21:30:03 -04:00

Add Memory::any_popup_open() (#2464)

* Added the "any_popup_open()" function

* Updated CHANGELOG.md

* add PR link to changelog

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
This commit is contained in:
francesco-cattoglio
2022-12-19 10:55:27 +01:00
committed by GitHub
parent 6554fbb151
commit 2c9b130423
2 changed files with 5 additions and 0 deletions

View File

@@ -479,6 +479,10 @@ impl Memory {
self.popup == Some(popup_id) || self.everything_is_visible()
}
pub fn any_popup_open(&self) -> bool {
self.popup.is_some() || self.everything_is_visible()
}
pub fn open_popup(&mut self, popup_id: Id) {
self.popup = Some(popup_id);
}