/// ======================================================================================================= public static OptionBox GetComboBox(string text, List <string> options = null, string name = null, Color?forecolor = null, DockStyle dock = DockStyle.None, int left = 10, int top = 0, int width = 100, int height = 20, bool autosize = false) { OptionBox combobox = new OptionBox() { Name = name == null ? "ComboBox" + ComboBoxCounter++ : name, Text = text, AutoSize = autosize, Font = CATFont, Dock = dock, BackColor = Color.Black, ForeColor = forecolor == null ? Color.White : (Color)forecolor, Height = height, FlatStyle = FlatStyle.Flat, Width = width, Left = left, Top = top }; if (options != null) { foreach (string option in options) { combobox.Items.Add(option); } } return(combobox); }
void Awake() { S = this; }