void OnExpansionWindowVisibilityChanged(ExpansionWindow e) { if (Expanded && e.Visible) { HideExpansionWindow(); e.Show(); } }
public ExpandingSelector(CheckBox checkBox, ExpansionWindow expansionWindow) { this.checkBox = checkBox; this.defaultTexture = checkBox.Texture; this.defaultImageRect = checkBox.ImageRect; checkBox.Toggled += MainBoxToggled; checkBox.HoverBegin += OnHoverBegin; checkBox.HoverEnd += OnHoverEnd; this.expansionWindow = expansionWindow; expansionWindow.VisibilityChanged += OnExpansionWindowVisibilityChanged; this.checkBoxes = new List <CheckBox>(); }