From c6a0db8602b6aa5e09c8c60db3550412e14a137a Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Fri, 27 Aug 2021 20:23:58 +0200 Subject: [PATCH] Docs: add link to on_disabled_hover_ui/text from on_hover_ui/text --- egui/src/response.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/egui/src/response.rs b/egui/src/response.rs index dff4404b..d54886d2 100644 --- a/egui/src/response.rs +++ b/egui/src/response.rs @@ -310,6 +310,8 @@ impl Response { /// Show this UI if the widget was hovered (i.e. a tooltip). /// /// The text will not be visible if the widget is not enabled. + /// For that, use [`Self::on_disabled_hover_ui`] instead. + /// /// If you call this multiple times the tooltips will stack underneath the previous ones. pub fn on_hover_ui(self, add_contents: impl FnOnce(&mut Ui)) -> Self { if self.should_show_hover_ui() { @@ -373,6 +375,8 @@ impl Response { /// Show this text if the widget was hovered (i.e. a tooltip). /// /// The text will not be visible if the widget is not enabled. + /// For that, use [`Self::on_disabled_hover_text`] instead. + /// /// If you call this multiple times the tooltips will stack underneath the previous ones. pub fn on_hover_text(self, text: impl ToString) -> Self { self.on_hover_ui(|ui| {