public override void AddToUI(IModifierSync s) { var us = s as UnsyncedModifier; if (us == null) { return; } if (duration_ == null || duration_.DurationType != us.Duration.GetFactoryTypeName()) { duration_ = MonitorUI.CreateDurationMonitor( "Unsynced duration", us.Duration, flags_); } if (duration_ != null) { duration_.AddToUI(us.Duration); } foreach (var w in delay_.GetWidgets(us.Delay)) { widgets_.AddToUI(w); } base.AddToUI(s); }
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; }
public void AddToUI(Step currentStep, IModifier currentModifier) { currentStep_ = currentStep; currentModifier_ = currentModifier; if (currentStep_ == null) { return; } if (currentModifier_ != null) { if (modifierMonitor_ == null || modifierMonitor_.ModifierType != currentModifier.GetFactoryTypeName()) { modifierMonitor_ = CreateModifierMonitor(currentModifier); } } if (currentStep_?.Duration != null) { if (duration_ == null || duration_.DurationType != currentStep_.Duration.GetFactoryTypeName()) { duration_ = CreateDurationMonitor( "Duration", currentStep_.Duration); } } widgets_.AddToUI(runningStep_); widgets_.AddToUI(active_); widgets_.AddToUI(enabled_); widgets_.AddToUI(paused_); widgets_.AddToUI(forceCheckEnabled_); widgets_.AddToUI(forceRun_); if (duration_ != null) { duration_.AddToUI(currentStep_.Duration); } foreach (var w in repeat_.GetWidgets()) { widgets_.AddToUI(w); } foreach (var w in delay_.GetWidgets(currentStep_?.Delay)) { widgets_.AddToUI(w); } foreach (var w in overlap_.GetWidgets()) { widgets_.AddToUI(w); } if (modifierMonitor_ != null) { modifierMonitor_.AddToUI(currentModifier); } }