//<!-- sc --> public GUIDropDownButton AddItemSub(string text, GUIDropDown opensSub, GUIDropDownButtonClick callback = null) { GUIDropDownButton btn = AddButton(text, null, opensSub, callback); opensSub.Visible = false; opensSub.Parent = this; opensSub.Position = new UDim2(1, 0, Size.Y.Scale * ItemCount, Size.Y.Offset * ItemCount); return(btn); }
GUIDropDownButton AddButton(string text, object value, GUIDropDown sub, GUIDropDownButtonClick callback) { GUIDropDownButton btn = new GUIDropDownButton(new UDim2(0, 0, ItemCount + (HideMainButton ? 0 : 1), 0), new UDim2(1, 0, 1, 0), Theme, text, OnSubClick, this, value, sub, callback, ItemCount); Items.Add(btn); if (ItemCount == 1 && applyTextOnClick) { Label.Text = text; CurrentValue = value; } return(btn); }
public GUIDropDownButton(UDim2 position, UDim2 size, GUITheme theme, string text, GUIButtonClick onClick, GUIDropDown dropdown, object value, GUIDropDown sub, GUIDropDownButtonClick callback, int index) : base(position, size, text + (sub != null ? " >" : ""), theme) { Sub = sub; this.dropdown = dropdown; Parent = dropdown; Value = value; Callback = callback; Index = index; if (sub != null) { ActiveImage = HoverImage; } Visible = false; Label.Visible = false; }
//<!-- sc --> public GUIDropDownButton AddItem(string text, object value, GUIDropDownButtonClick callback = null) { return(AddButton(text, value, null, callback)); }