public void Update(MouseState current, Input previous) { int marked = -1; for (int i = 0; i < _panel.Count; i++) { OptionsButton btn = _panel[i]; OptionButtonState state = btn.MarkedState; btn.Update(current, previous); if (btn.MarkedState != state) { marked = i; } } if (marked != -1) { for (int i = 0; i < _panel.Count; i++) { if (i != marked) { _panel[i].UnMark(); } } } }
public void Remove(OptionsButton ob) { _panel.Remove(ob); UnmarkAll(); }
public void Add(OptionsButton button) { _panel.Add(button); _panel[_panel.Count - 1].AllowClickToUnmark = false; }