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
+6
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> {