Is there some example code for a Lemur Spinner for setting Integer values?
I now have this:
SequenceModel model = SequenceModels.rangedSequence(new DefaultRangedValueModel(0, 100, 0), 1, 1);
VersionedReference valueRef = model.createReference();
DefaultValueRenderer<Integer> renderer = ValueRenderers.formattedRenderer("%d", "error");
Spinner<Integer> spinner = new Spinner<>(model);
spinner.setValue(50);
//doubleSpinner.setLocalTranslation(200, 200, 0);
row.addChild(spinner);
And it keeps complaining about this:
SEVERE: Uncaught exception thrown in Thread[jME3 Main,5,main]
java.lang.ClassCastException: class java.lang.Integer cannot be cast to class java.lang.Double (java.lang.Integer and java.lang.Double are in module java.base of loader 'bootstrap')
at com.simsilica.lemur.SequenceModels$RangedSequence.setObject(SequenceModels.java:176)
at com.simsilica.lemur.Spinner.setValue(Spinner.java:231)
And would it be an idea to add a constructor that acts as a wrapper for all these extra objects like DefaultValueRenders and SequenceModels? I think for many controls this would help to make Lemur easier to use.