Hi
I'm using ControlP5 textfields to add a text input in my program. I'm using a controlFont to change the pixel font used to display the text in the textfield, and until a few days ago it worked fine. I just updated the ControlP5 library and after the update, the text that I write in the textfield is no longer visible. The cursor moves and the text that I write is saved in my string, but it's just not visible in the textfield. I guess the color of the text is set to be the same as the background or something like that.
I have tried setColor(), setColorLabel() and various other functions but nothing seems to work. I use controlP5.setControlFont(labelFont) to set the controlFont for all my controllers but it's only inside the textfield that it doesn't work, everywhere else the labels are visible and white as they should be.
This is the code I use. I call controllerSetup() in my setup() function. The program has grown rather big so I have tried to only show the code that is relevant for this post.
- String fileNameString;
- Textfield fileNameField;
- Textfield valueField;
- //----------------------------------------------------------------------------------
- void controllerSetup() {
- controlP5 = new ControlP5(this);
- labelPFont = loadFont("Gulim-12.vlw");
- labelFont = new ControlFont(labelPFont);
- controlP5.setControlFont(labelFont);
- //Inputfield for filename
- String nameString = "Filename";
- fileNameField = controlP5.addTextfield("filename", 100, 140, 200, 20);
- fileNameField.setColorLabel(color(255));
- fileNameField.setLabel(nameString);
- fileNameField.captionLabel().toUpperCase(false);
- fileNameField.setFocus(true);
- fileNameField.setAutoClear(false);
- fileNameField.setMoveable(false);
- //Number input for runmode
- valueField = controlP5.addTextfield("value", 280, 418, 50, 20);
- valueField.setLabel("");
- valueField.captionLabel().toUpperCase(false);
- valueField.setFocus(false);
- valueField.setAutoClear(false);
- valueField.setMoveable(false);
- }
I hope someone can help.
Thanks and best regards
Morten
1