mirror of
https://github.com/emilk/egui.git
synced 2026-06-26 22:53:14 -04:00
Add Ui::is_tooltip (#8016)
This commit is contained in:
@@ -487,6 +487,12 @@ impl Ui {
|
||||
&mut self.style_mut().visuals
|
||||
}
|
||||
|
||||
/// Is this [`Ui`] in a tooltip?
|
||||
#[inline]
|
||||
pub fn is_tooltip(&self) -> bool {
|
||||
self.layer_id().order == Order::Tooltip
|
||||
}
|
||||
|
||||
/// Get a reference to this [`Ui`]'s [`UiStack`].
|
||||
#[inline]
|
||||
pub fn stack(&self) -> &Arc<UiStack> {
|
||||
|
||||
Reference in New Issue
Block a user