File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -119,9 +119,11 @@ class EmgSettingsUI extends PApplet implements Runnable {
119119 scene();
120120
121121 // Draw header
122+ pushStyle ();
122123 noStroke ();
123124 fill (HEADER_COLOR );
124125 rect (0 , 0 , width , HEADER_HEIGHT );
126+ popStyle ();
125127
126128 emgSettingsValues = dataProcessing. emgSettings. values;
127129
@@ -140,7 +142,12 @@ class EmgSettingsUI extends PApplet implements Runnable {
140142 drawChannelLabels();
141143
142144 // Draw cp5 objects on top of everything
143- emgCp5. draw();
145+ try {
146+ emgCp5. draw();
147+ } catch (ConcurrentModificationException e) {
148+ e. printStackTrace();
149+ outputError(" EMG Settings UI: Unable to draw cp5 objects." );
150+ }
144151 }
145152
146153 private void scene () {
@@ -229,7 +236,8 @@ class EmgSettingsUI extends PApplet implements Runnable {
229236 }
230237
231238 private void createAllUIObjects () {
232- footerObjY = y + h - FOOTER_PADDING / 2 - FOOTER_OBJECT_HEIGHT ;
239+ final int HALF_FOOTER_HEIGHT = (FOOTER_PADDING + (DROPDOWN_SPACER * 2 )) / 2 ;
240+ footerObjY = y + h - HALF_FOOTER_HEIGHT - (FOOTER_OBJECT_HEIGHT / 2 );
233241 int middle = x + w / 2 ;
234242 int halfObjWidth = FOOTER_OBJECT_WIDTH / 2 ;
235243 footerObjX[0 ] = middle - halfObjWidth - PADDING_12 - FOOTER_OBJECT_WIDTH ;
You can’t perform that action at this time.
0 commit comments