public void Create() { toggleMonitor_ = new Button("Monitor", ToggleMonitor); options_ = new OptionsUI(Widget.Right); stepsList_ = new StringList( "Steps", "", new List <string>(), StepChanged, Widget.NavButtons); insertStepBefore_ = new Button( "Insert step before", InsertStepBefore); insertStepAfter_ = new Button( "Insert step after", InsertStepAfter); cloneStep_ = new Button("Clone step", CloneStep); stepProgression_ = new StepProgressionStringList( "Step progression", StepProgressionChanged); modifiersList_ = new StringList( "Modifiers", "", new List <string>(), ModifierChanged, Widget.Right | Widget.NavButtons); addModifier_ = new Button( "Add modifier", AddModifier, Widget.Right); cloneModifier_ = new Button( "Clone modifier", CloneModifier, Widget.Right); cloneModifierZero_ = new Button( "Clone modifier zero values", CloneModifierZero, Widget.Right); cloneModifierSynced_ = new Button( "Clone modifier zero synced", CloneModifierZeroSynced, Widget.Right); stepsList_.PopupHeight = 1000; modifiersList_.PopupHeight = 1000; step_ = new StepUI(); modifier_ = new ModifierUI(this); monitor_ = new MonitorUI(); ResetUI(); }
public List <IWidget> GetWidgets(IDuration d) { duration_ = d; if (duration_ != null) { if (ui_ == null || ui_.DurationType != d.GetFactoryTypeName()) { ui_ = MonitorUI.CreateDurationMonitor( name_, duration_, flags_); } } if (ui_ == null) { return(new List <IWidget>()); } return(ui_.GetWidgets(d)); }
public override void AddToUI(IModifier m) { modifier_ = m as AudioModifier; if (modifier_ == null) { return; } if (modifier_ != null) { if (delay_ == null || delay_.DurationType != modifier_.Delay.GetFactoryTypeName()) { delay_ = MonitorUI.CreateDurationMonitor( "Delay", modifier_.Delay, Widget.Right); } } else { delay_ = null; } if (delay_ != null) { delay_.AddToUI(modifier_?.Delay); } widgets_.AddToUI(state_); widgets_.AddToUI(clip_); widgets_.AddToUI(sourceClip_); widgets_.AddToUI(seek_); widgets_.AddToUI(pauseToggle_); clip_.Height = 100; sourceClip_.Height = 100; pauseToggle_.BackgroundColor = Color.red; pauseToggle_.TextColor = Color.white; }