public void AddButtons(List <GUIButton> buttons, GUITogglePanelSelectionType selectiontype = GUITogglePanelSelectionType.Single, Orientation orientation = Orientation.Horizontal) { _buttons.Clear(); _buttons = buttons.GetRange(0, buttons.Count); _selection_type = selectiontype; Container.Orientation = orientation; Container.Children.Clear(); foreach (GUIButton button in _buttons) { button.Margin = new Thickness(10); button.OnLeftClick += SelectButton_Click; Container.Children.Add(button); } }
private void BuildToggle(GUIEnumerations.ButtonType buttontype, GUITogglePanelSelectionType selectiontype) { GUIButton button = new GUIButton( buttontype, GUIElements.GUIEnumerations.ButtonDock.Top, selectiontype.ToString(), string.Format(@"{0}{1}", System.AppDomain.CurrentDomain.BaseDirectory, "mute.png"), null ); button.UpdateFrame(new Thickness(10), Brushes.Black, 0.6, Brushes.Black, new Thickness(1)); button.UpdateButton(Colors.Transparent, null, false); button.UpdatePicture(null, 20, 20); button.UpdateCaption(Colors.White, Colors.Black, string.Empty); if (selectiontype == GUITogglePanelSelectionType.Single) { _single_buttons.Add(button); } else { _multi_buttons.Add(button); } }