public void AddTableCell(string leftLabelString, string rightSpriteImageName, ImAbstractItem item, TableCellType type) { ImTableCell tableCell = new ImTableCell("tableCell", 8f, 3f, width_ - inset_, Color.white, type); tableCells.Add(tableCell); tableCell.x = inset_ / 2f - width_ / 2f; tableCell.AddLeftLabel("TwCen", leftLabelString, Color.black, 0.2f); tableCell.AddRightSprite(rightSpriteImageName, 1f); tableCell.rightSpriteComponent.sprite.color = Color.blue; tableCell.item = item; AddChild(tableCell); RefreshHeight(); ArrangeCells(); }
public void HandleItemUsed(ImAbstractItem item) { inventory.Remove(item); }