private void DisplayAttribute(int index)
{
int y = StatStartingPoss + (index * LineHeight);
GUI.Label(new Rect(Offset, y, StatLabelWidth, LineHeight),
((AttributeName)index).ToString());
GUI.Label(new Rect(StatLabelWidth + Offset, y, BaseValueLabelWidth, LineHeight),
toon.GetPrimaryAttribute(index).AdjustedBaseValue.ToString());
if (GUI.Button(new Rect(Offset + StatLabelWidth + BaseValueLabelWidth,
y, ButtonWidth, ButtonHeight), "-"))
{
if (toon.GetPrimaryAttribute(index).BaseValue > MinimumStartingValue)
{
toon.GetPrimaryAttribute(index).BaseValue--;
pointsLeft++;
}
toon.StatUpdate();
}
if (GUI.Button(new Rect(Offset + StatLabelWidth + BaseValueLabelWidth + ButtonWidth,
y, ButtonWidth, ButtonHeight), "+", guiStyle))
{
if (pointsLeft > 0)
{
toon.GetPrimaryAttribute(index).BaseValue++;
pointsLeft--;
}
toon.StatUpdate();
}
}