/// <summary> /// Add an object to this dropdown menu /// </summary> /// <param name="obj">GI_Obj to open upon clicking</param> /// <param name="title">Button title</param> public virtual void AddObject(GI_Obj obj, string title) { int width = _gameInterface.DropdownButtonWidth; int height = _gameInterface.DropdownButtonHeight; int x = _objs.Count * width; int y = Top; GI_DropdownButton button = new GI_DropdownButton(_gameInterface, _texture, width, height, x, y, title); _objs.Add(button); button.Clicked += obj.Open; }
public void AddButtonForObj(GI_Obj obj, string title) { AddButton(() => { obj.Open(); }, title); }
/// <summary> /// Add a GI_Obj to this cell and adjust the cell accordingly /// </summary> public void AddObject(GI_Obj obj) { _objs.Add(obj); }