public void AddTableCell(string leftLabelString, string rightSpriteImageName, TableCellType type) { WTTableCell tableCell = new WTTableCell("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; AddChild(tableCell); RefreshHeight(); ArrangeCells(); }
public void AddTableCell(string centerLabelString, TableCellType type) { WTTableCell tableCell = new WTTableCell("tableCell", 8f, 3f, width_ - inset_, Color.white, type); tableCells.Add(tableCell); tableCell.x = inset_ / 2f - width_ / 2f; tableCell.AddCenterLabel("TwCen", centerLabelString, Color.black, 0.2f); AddChild(tableCell); RefreshHeight(); ArrangeCells(); }
public void RemoveTableCell(WTTableCell tableCell) { tableCells.Remove(tableCell); RemoveChild(tableCell); RefreshHeight(); ArrangeCells(); }