@@ -52,6 +52,8 @@ class TopNav {
5252 private final int SUBNAV_BUT_H = 26 ;
5353 private final int TOPNAV_BUT_H = SUBNAV_BUT_H ;
5454
55+ private boolean topNavDropdownMenuIsOpen = false ;
56+
5557 TopNav () {
5658 int controlPanel_W = 256 ;
5759
@@ -469,7 +471,7 @@ class TopNav {
469471 // make Help button and Settings button mutually exclusive
470472 if (! tutorialSelector. isVisible) {
471473 configSelector. toggleVisibility();
472- }
474+ }
473475 }
474476 });
475477 settingsButton. setDescription(" Save and Load GUI Settings! Click Default to revert to factory settings." );
@@ -528,6 +530,14 @@ class TopNav {
528530 toggleDataStreamingButton. setLock(_b);
529531 filtersButton. setLock(_b);
530532 }
533+
534+ public boolean getDropdownMenuIsOpen () {
535+ return topNavDropdownMenuIsOpen;
536+ }
537+
538+ public void setDropdownMenuIsOpen (boolean b ) {
539+ topNavDropdownMenuIsOpen = b;
540+ }
531541}
532542
533543class LayoutSelector {
@@ -621,6 +631,7 @@ class LayoutSelector {
621631
622632 void toggleVisibility () {
623633 isVisible = ! isVisible;
634+ topNav. setDropdownMenuIsOpen(isVisible);
624635 if (isVisible) {
625636 // the very convoluted way of locking all controllers of a single controlP5 instance...
626637 for (int i = 0 ; i < wm. widgets. size(); i++ ) {
@@ -804,6 +815,7 @@ class ConfigSelector {
804815
805816 void toggleVisibility () {
806817 isVisible = ! isVisible;
818+ topNav. setDropdownMenuIsOpen(isVisible);
807819 if (systemMode >= SYSTEMMODE_POSTINIT ) {
808820 if (isVisible) {
809821 // the very convoluted way of locking all controllers of a single controlP5 instance...
@@ -1049,6 +1061,7 @@ class TutorialSelector {
10491061
10501062 void toggleVisibility () {
10511063 isVisible = ! isVisible;
1064+ topNav. setDropdownMenuIsOpen(isVisible);
10521065 if (systemMode >= SYSTEMMODE_POSTINIT ) {
10531066 if (isVisible) {
10541067 // the very convoluted way of locking all controllers of a single controlP5 instance...
0 commit comments