Skip to content

Commit 9eaf884

Browse files
committed
Update Marker Widget UI to improve UDP receiver textfield appearance
1 parent 3deb1a3 commit 9eaf884

5 files changed

Lines changed: 857 additions & 803 deletions

File tree

OpenBCI_GUI/Extras.pde

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,11 +292,14 @@ String getIpAddrFromStr(String strWithIP) {
292292
}
293293
}
294294

295-
float getFontStringHeight(PFont _font, String string) {
295+
float getFontStringHeight(PFont font, String text) {
296+
if (text == null) {
297+
return 0;
298+
}
296299
float minY = Float.MAX_VALUE;
297300
float maxY = Float.NEGATIVE_INFINITY;
298-
for (Character c : string.toCharArray()) {
299-
PShape character = _font.getShape(c); // create character vector
301+
for (Character c : text.toCharArray()) {
302+
PShape character = font.getShape(c); // create character vector
300303
for (int i = 0; i < character.getVertexCount(); i++) {
301304
minY = min(character.getVertex(i).y, minY);
302305
maxY = max(character.getVertex(i).y, maxY);

OpenBCI_GUI/Grid.pde

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class Grid {
4242
pushStyle();
4343
textAlign(LEFT);
4444
stroke(OPENBCI_DARKBLUE);
45-
textFont(p5, 12);
45+
textFont(tableFont, tableFontSize);
4646

4747
if (drawTableInnerLines) {
4848
// draw row lines

0 commit comments

Comments
 (0)