1
0
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:
Emil Ernerfeldt
2026-03-25 10:11:30 +01:00
committed by GitHub
parent 12b5045633
commit bfbf23b4fb

View File

@@ -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> {