The code below works great for when the user assigns the total amount of stat points I allocate. However, I would love to only disable the plus button, so they could lower a stat value and then add again.
if ((strengthModel.getNumber().intValue()) + (constitutionModel.getNumber().intValue()) + (dexterityModel.getNumber().intValue()) + (intelligenceModel.getNumber().intValue()) > 49){
strengthSpinner.setEnabled(false);
constitutionSpinner.setEnabled(false);
dexteritySpinner.setEnabled(false);
intelligenceSpinner.setEnabled(false);
}
Is that possible with int spinners? I did not see it in the docs.
EDIT Bit more info: You can spread your stat points around or assign them all to one stat. The max on each of the models is all 10 of the un-used points.