public override void Setter(IMyTerminalBlock block, float value) { base.Setter(block, value); var controls = new List <IMyTerminalControl>(); MyAPIGateway.TerminalControls.GetControls <T>(out controls); var maxSlider = controls.Find((x) => x.Id == "MaxSlider" + Definition.SubtypeId); if (maxSlider != null && m_ui.MaxSlider != null) { var maxValue = m_ui.MaxSlider.Getter(block); m_ui.MaxSlider.SetterNoCheck(block, Math.Max(maxValue, value)); maxSlider.UpdateVisual(); m_ui.Sync(block); } }
public override void Setter(IMyTerminalBlock block, float value) { base.Setter(block, value); m_ui.Sync(block); }