Previously the editor assumed that if the editor_rect contained the
cursor, then the editor should act like it is hovered. This works as
long as the editor is the only widget in the central panel, but it broke
when interacting with windows.
If a window was covering some part of the editor widget:
1. You could open the node finder while hovering the window, which is
terrible for interacting with widgets within that window.
2. You could not close the node finder by clicking on the window (this
click was considered neither a background click, nor an out-of-editor
click).
This is fixed by using egui sense to detect hover, which will
automatically handle any widgets overlapping the editor.
This method draws the UI for each of the outputs corresponding to the
node. Defaults to the label that was the previous hard-coded behavior.
The default impl also means this isn't a breaking change.
Depending on the usage of value widgets, we might wish to display an
alternative UI if the input is connected.
Motivating example: consider a node with an input representing some
amount of time in the context of digital signal processing. Multiple
valuable representations of time may be desired as inputs:
* number of seconds
* number of samples
* wavelength corresponding to some frequency in Hz
In such a case we would use value_widget to display a widget for
selecting both the number and the unit, and value_widget_connected for
only selecting the unit, because the numerical value would already be
supplied by another node.
Users can specify UI that will be added to the top bar of a node via the
new top_bar_ui method in NodeDataTrait. A default definition is provided
because it's not core to the functionality and so as to avoid
unnecessarily breaking existing programs.
- The box selection should only be activated by the primary mouse
- Now that egui finally supports it, make the node finder trigger be a
mouse click, not a "mouse down". This prevents a weird behavior where
you could drag around the node finder when clicking and dragging with
the left mouse button