@@ -437,23 +437,23 @@ class SessionSettings {
437437
438438 int numActiveWidgets = 0 ;
439439 // Save what Widgets are active and respective Container number (see Containers.pde)
440- for (int i = 0 ; i < wm . widgets. size(); i++ ) { // increment through all widgets
441- if (wm . widgets. get(i). getIsActive()) { // If a widget is active...
440+ for (int i = 0 ; i < widgetManager . widgets. size(); i++ ) { // increment through all widgets
441+ if (widgetManager . widgets. get(i). getIsActive()) { // If a widget is active...
442442 numActiveWidgets++ ; // increment numActiveWidgets
443443 // println("Widget" + i + " is active");
444444 // activeWidgets.add(i); //keep track of the active widget
445- int containerCountsave = wm . widgets. get(i). currentContainer;
445+ int containerCountsave = widgetManager . widgets. get(i). currentContainer;
446446 // println("Widget " + i + " is in Container " + containerCountsave);
447447 saveWidgetSettings. setInt(" Widget_" + i, containerCountsave);
448- } else if (! wm . widgets. get(i). getIsActive()) { // If a widget is not active...
448+ } else if (! widgetManager . widgets. get(i). getIsActive()) { // If a widget is not active...
449449 saveWidgetSettings. remove(" Widget_" + i); // remove non-active widget from JSON
450450 // println("widget"+i+" is not active");
451451 }
452452 }
453453 println (" SessionSettings: " + numActiveWidgets + " active widgets saved!" );
454454 // Print what widgets are in the containers used by current layout for only the number of active widgets
455455 // for (int i = 0; i < numActiveWidgets; i++) {
456- // int containerCounter = wm .layouts.get(currentLayout).containerInts[i];
456+ // int containerCounter = widgetManager .layouts.get(currentLayout).containerInts[i];
457457 // println("Container " + containerCounter + " is available"); //For debugging
458458 // }
459459 saveSettingsJSONData. setJSONObject(kJSONKeyWidget, saveWidgetSettings);
@@ -613,16 +613,16 @@ class SessionSettings {
613613 // get the Widget/Container settings
614614 JSONObject loadWidgetSettings = loadSettingsJSONData. getJSONObject(kJSONKeyWidget);
615615 // Apply Layout directly before loading and applying widgets to containers
616- wm . setNewContainerLayout(currentLayout);
616+ widgetManager . setNewContainerLayout(currentLayout);
617617 verbosePrint(" LoadGUISettings: Layout " + currentLayout + " Loaded!" );
618618 numLoadedWidgets = loadWidgetSettings. size();
619619
620620
621621 // int numActiveWidgets = 0; //reset the counter
622- for (int w = 0 ; w < wm . widgets. size(); w++ ) { // increment through all widgets
623- if (wm . widgets. get(w). getIsActive()) { // If a widget is active...
622+ for (int w = 0 ; w < widgetManager . widgets. size(); w++ ) { // increment through all widgets
623+ if (widgetManager . widgets. get(w). getIsActive()) { // If a widget is active...
624624 verbosePrint(" Deactivating widget [" + w + " ]" );
625- wm . widgets. get(w). setIsActive(false );
625+ widgetManager . widgets. get(w). setIsActive(false );
626626 // numActiveWidgets++; //counter the number of de-activated widgets
627627 }
628628 }
@@ -638,8 +638,8 @@ class SessionSettings {
638638 // Load the container for the current widget[w]
639639 int containerToApply = loadWidgetSettings. getInt(loadedWidgetsArray[w]);
640640
641- wm . widgets. get(widgetToActivate). setIsActive(true );// activate the new widget
642- wm . widgets. get(widgetToActivate). setContainer(containerToApply);// map it to the container that was loaded!
641+ widgetManager . widgets. get(widgetToActivate). setIsActive(true );// activate the new widget
642+ widgetManager . widgets. get(widgetToActivate). setContainer(containerToApply);// map it to the container that was loaded!
643643 println (" LoadGUISettings: Applied Widget " + widgetToActivate + " to Container " + containerToApply);
644644 }// end case for all widget/container settings
645645
@@ -673,7 +673,7 @@ class SessionSettings {
673673 } else {
674674 hpWidgetNumber = 5;
675675 }
676- if (wm .widgets.get(hpWidgetNumber).getIsActive()) {
676+ if (widgetManager .widgets.get(hpWidgetNumber).getIsActive()) {
677677 w_headPlot.headPlot.setPositionSize(w_headPlot.headPlot.hp_x, w_headPlot.headPlot.hp_y, w_headPlot.headPlot.hp_w, w_headPlot.headPlot.hp_h, w_headPlot.headPlot.hp_win_x, w_headPlot.headPlot.hp_win_y);
678678 println("Headplot is active: Redrawing");
679679 }
0 commit comments