From 9c8d5f32587dc8429777cf4e6d5bf5d35223c5d4 Mon Sep 17 00:00:00 2001 From: Kamil Koczurek Date: Mon, 8 May 2023 10:41:02 +0200 Subject: [PATCH] update WidgetValueTrait::value_widget* comments --- egui_node_graph/src/traits.rs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/egui_node_graph/src/traits.rs b/egui_node_graph/src/traits.rs index a006fdb..7b95dcd 100644 --- a/egui_node_graph/src/traits.rs +++ b/egui_node_graph/src/traits.rs @@ -14,10 +14,11 @@ pub trait WidgetValueTrait: Default { type UserState; type NodeData; - /// This method will be called for each input parameter with a widget. The - /// return value is a vector of custom response objects which can be used + /// This method will be called for each input parameter with a widget with an disconnected + /// input only. To display UI for connected inputs use [`WidgetValueTrait::value_widget_connected`]. + /// The return value is a vector of custom response objects which can be used /// to implement handling of side effects. If unsure, the response Vec can - /// be empty. It isn't called if the input is connected. + /// be empty. fn value_widget( &mut self, param_name: &str, @@ -27,11 +28,13 @@ pub trait WidgetValueTrait: Default { node_data: &Self::NodeData, ) -> Vec; - /// This method will be called for each input parameter with a widget. The - /// return value is a vector of custom response objects which can be used + /// This method will be called for each input parameter with a widget with a connected + /// input only. To display UI for diconnected inputs use [`WidgetValueTrait::value_widget`]. + /// The return value is a vector of custom response objects which can be used /// to implement handling of side effects. If unsure, the response Vec can - /// be empty. This differs from [`WidgetValueTrait::value_widget`] - /// by being called if and only if the input has a connection. + /// be empty. + /// + /// Shows the input name label by default. fn value_widget_connected( &mut self, param_name: &str,