public void AddToUI(StorableParameterHolder h) { if (holder_ != h) { storablesStale_ = true; parametersStale_ = true; } holder_ = h; storables_.Value = holder_?.Storable?.storeId ?? ""; parameters_.Value = holder_?.Parameter?.Name ?? ""; storables_.AddToUI(); parameters_.AddToUI(); }
public override void AddToUI(IModifierSync s) { sync_ = s as OtherModifierSyncedModifier; if (sync_?.ParentModifier?.ParentStep == null) { return; } var names = new List <string>(); bool found = false; foreach (var m in sync_.ParentModifier.ParentStep.Modifiers) { if (m.Modifier == sync_.ParentModifier) { continue; } names.Add(m.Name); if (sync_.OtherModifier != null && sync_.OtherModifier == m.Modifier) { found = true; } } modifiers_.Choices = names; if (found) { modifiers_.Value = sync_.OtherModifier.Name; } else { if (sync_.OtherModifier != null) { Synergy.LogError( "modifier '" + sync_.OtherModifier.Name + "' " + "not found"); } modifiers_.Value = ""; } modifiers_.AddToUI(); }