You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let _swap_response = ui.checkbox(&mut ontop.lock(),"Swap").on_hover_text("Change the drawing order of waveforms");
227
240
228
-
let sync_response = ui.checkbox(&mut sync_var.lock(),"Sync Beat").on_hover_text("Lock drawing to beat");
241
+
let sync_response = ui.checkbox(&mut sync_var.lock(),"Sync").on_hover_text("Lock drawing to timing");
229
242
let alt_sync = ui.checkbox(&mut alt_sync.lock(),"Alt. Sync").on_hover_text("Try this if Sync doesn't work");
243
+
let timing = ui.add(widgets::ParamSlider::for_param(¶ms.sync_timing, setter).with_width(60.0)).on_hover_text("Refresh interval when sync enabled");
230
244
231
245
let dir_response = ui.checkbox(&mut dir_var.lock(),"Flip").on_hover_text("Flip direction of oscilloscope");
232
246
233
247
if gain_handle.changed(){
234
248
sum_line = Line::new(PlotPoints::default());
235
249
}
236
250
// Reset our line on change
237
-
if sync_response.clicked() || dir_response.clicked() || alt_sync.clicked()
251
+
if sync_response.clicked() || dir_response.clicked() || alt_sync.clicked() || timing.changed()
238
252
{
253
+
// Keep same direction when syncing (Issue #12)
254
+
if sync_response.clicked(){
255
+
// If flip selected already, it should be deselected on this click
256
+
if*dir_var.lock(){
257
+
*dir_var.lock() = false;
258
+
}
259
+
// If flip not selected, it should now be selected
260
+
else{
261
+
*dir_var.lock() = true;
262
+
}
263
+
}
239
264
sum_line = Line::new(PlotPoints::default());
240
265
aux_line = Line::new(PlotPoints::default());
241
266
line = Line::new(PlotPoints::default());
@@ -380,19 +405,43 @@ impl Plugin for Gain {
380
405
// This should still play well with other DAWs using this timing
0 commit comments