mirror of
https://github.com/robbert-vdh/nih-plug.git
synced 2026-07-01 02:36:54 +00:00
Refactor GUIs to use param's own default value
This removes the need to pass a lot of these `ParamSetter`s and `GuiContext`s around. We also don't need explicit events to reset a parameter anymore since you can get this information from the parameter itself.
This commit is contained in:
@@ -85,13 +85,9 @@ impl IcedEditor for CrispEditor {
|
||||
}
|
||||
|
||||
fn view(&mut self) -> Element<'_, Self::Message> {
|
||||
GenericUi::new(
|
||||
&mut self.generic_ui_state,
|
||||
self.params.as_ref(),
|
||||
self.context.as_ref(),
|
||||
)
|
||||
.pad_scrollbar()
|
||||
.map(Message::ParamUpdate)
|
||||
GenericUi::new(&mut self.generic_ui_state, self.params.as_ref())
|
||||
.pad_scrollbar()
|
||||
.map(Message::ParamUpdate)
|
||||
}
|
||||
|
||||
fn background_color(&self) -> nih_plug_iced::Color {
|
||||
|
||||
Reference in New Issue
Block a user