private void addNEATParamInput(String name, int offset) { UILabel label = new UILabel(this, 0, offset * 50, name); UITextField input = new UITextField(this, 0, offset * 50 + 20, 250, getNEATParam(name)); input.setEventHandler( new UIAction() { public void change(UITextField input) { setNEATParam(input.getName(), input.getText()); } }); input.setName(name); neatParams.addObject(label); neatParams.addObject(input); neatParamInputs.add(input); }
private void setAllNEATParams() { for (int i = 0; i < neatParameters.length; i++) { UITextField input = neatParamInputs.get(i); input.setText(getNEATParam(neatParameters[i])); } }