Skip to content

Commit bcfa1f3

Browse files
committed
ControlP5 2.3.4 - Centered Textfields!
1 parent 1ffb6d1 commit bcfa1f3

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

OpenBCI_GUI/FilterUI.pde

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ class FilterUIPopup extends PApplet implements Runnable {
412412
private void updateChannelCp5Objects() {
413413

414414
//Reusable variables to update UI objects
415-
color onColor = TURN_ON_GREEN;
415+
color onColor = SUBNAV_LIGHTBLUE;
416416
color offColor = BUTTON_PRESSED_DARKGREY;
417417
color updateColor = offColor;
418418
String firstColumnTFValue = "";
@@ -558,6 +558,7 @@ class FilterUIPopup extends PApplet implements Runnable {
558558
.setText(Integer.toString(intValue)) //set the text
559559
.align(5, 10, 20, 40)
560560
.setAutoClear(false)
561+
.setIsCentered(true)
561562
; //Don't clear textfield when pressing Enter key
562563
myTextfield.getValueLabel().align(CENTER, CENTER);
563564
//Clear textfield on double click
@@ -950,7 +951,7 @@ class FilterUIPopup extends PApplet implements Runnable {
950951
}
951952

952953
private void createMasterOnOffButton(String name, final String text, int _x, int _y, int _w, int _h) {
953-
masterOnOffButton = createButton(cp5, name, text, _x, _y, _w, _h, 0, h2, 16, TURN_ON_GREEN, WHITE, BUTTON_HOVER, BUTTON_PRESSED, (Integer) null, -2);
954+
masterOnOffButton = createButton(cp5, name, text, _x, _y, _w, _h, 0, h2, 16, SUBNAV_LIGHTBLUE, WHITE, BUTTON_HOVER, BUTTON_PRESSED, (Integer) null, -2);
954955
masterOnOffButton.setCircularButton(true);
955956
masterOnOffButton.onRelease(new CallbackListener() {
956957
public void controlEvent(CallbackEvent theEvent) {

OpenBCI_GUI/OpenBCI_GUI.pde

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ final color buttonsLightBlue = color(57,128,204);
239239
final color GREY_125 = color(125);
240240
final color GREY_100 = color(100);
241241
final color GREY_20 = color(20);
242-
final color TURN_ON_GREEN = color(223, 242, 191);
242+
final color TURN_ON_GREEN = color(195, 242, 181);
243243
final color TURN_OFF_RED = color(255, 210, 210);
244244
final color BOLD_RED = color(224, 56, 45);
245245
final color BUTTON_HOVER = color(177, 184, 193);//color(252, 221, 198);
323 KB
Binary file not shown.

0 commit comments

Comments
 (0)