public int Dropdown( int formHandle, LuaTable items, int?x = null, int?y = null, int?width = null, int?height = null) { var form = GetForm(formHandle); if (form == null) { return(0); } var dropdownItems = items.Values.Cast <string>().ToList(); dropdownItems.Sort(); var dropdown = new LuaDropDown(dropdownItems); form.Controls.Add(dropdown); if (x.HasValue && y.HasValue) { SetLocation(dropdown, x.Value, y.Value); } if (width.HasValue && height.HasValue) { SetSize(dropdown, width.Value, height.Value); } return((int)dropdown.Handle); }
public int Dropdown( int formHandle, LuaTable items, int? x = null, int? y = null, int? width = null, int? height = null) { var form = GetForm(formHandle); if (form == null) { return 0; } var dropdownItems = items.Values.Cast<string>().ToList(); dropdownItems.Sort(); var dropdown = new LuaDropDown(dropdownItems); form.Controls.Add(dropdown); if (x.HasValue && y.HasValue) { SetLocation(dropdown, x.Value, y.Value); } if (width.HasValue && height.HasValue) { SetSize(dropdown, width.Value, height.Value); } return (int)dropdown.Handle; }