public static bool CreateGuiItemsGroup( this List <GuiItem> guiItems, List <string> names, List <Rect> rects, GuiItemType type, GuiItemColor itemColor, string toolTip = null, GuiItemState state = GuiItemState.NORMAL, bool enabled = true, FontStyle fontStyle = FontStyle.Normal, TextAnchor textAnchor = TextAnchor.MiddleCenter, Event <object> onChangedEvent = null) { guiItems.Clear(); for (int i = 0; i < names.Count; i++) { guiItems.Add(new GuiItem() { Name = names[i], Tooltip = toolTip, Type = type, Enabled = enabled, Rect = rects[i], ItemColor = itemColor, State = state, FontStyle = fontStyle, TextAnchor = textAnchor, OnChangedEvent = onChangedEvent }); } return(true); }
public static void SetGuiItemsGroupLabel(this List <GuiItem> guiItems, string name, Rect rect, GuiItemColor itemColor, FontStyle fontStyle = FontStyle.Normal, TextAnchor textAnchor = TextAnchor.MiddleLeft) { guiItems.Add(new GuiItem() { Name = name, Type = GuiItemType.LABEL, Enabled = true, Rect = rect, ItemColor = itemColor, FontStyle = fontStyle, TextAnchor = textAnchor }); }