         showMenu();
         break;
 
-      default:     break;
-    }
-    vTaskDelay( tftTaskdelayTime / portTICK_PERIOD_MS );
-  }
-}
-
-void showMenu()
-{
-  static lightStatus_t currentLightStatus;
+      default:
+        break;
+    }
+    vTaskDelay( tftTaskdelayTime );
+  }
+}
+
+static inline __attribute__((always_inline)) void showMenu()
+{
+  static lightStatus_t tftLightStatus;
 
   if ( tftClearScreen )
   {
     tft.fillScreen( ILI9341_BLACK );
     drawMenuButtons();
-    drawBacklightSlider();
+    drawBacklightSlider( BL_SLIDER_AREA, "backlight" );
     ledcWrite( TFT_BACKLIGHT_CHANNEL, map( tftBrightness, 0, 100, 0, backlightMaxvalue ) );
     tftClearScreen = false;
-    currentLightStatus = lightStatus;
+    tftLightStatus = lightStatus;
   }
 
   /* check if tftBrightness has changed */
   if ( map( tftBrightness, 0, 100, 0, backlightMaxvalue ) != ledcRead( TFT_BACKLIGHT_CHANNEL ) )
   { /* set new backlight value */
     ledcWrite( TFT_BACKLIGHT_CHANNEL, map( tftBrightness, 0, 100, 0, backlightMaxvalue ) );
-    drawBacklightSlider();
+    drawBacklightSlider( BL_SLIDER_AREA, "" );
   }
 
   /* check if light status has changed */
-  if ( currentLightStatus != lightStatus )
+  if ( tftLightStatus != lightStatus )
   {
     drawMenuButtons();
-    currentLightStatus = lightStatus;
+    tftLightStatus = lightStatus;
   }
 
   if ( touch.tirqTouched() )

  return { x, y };
}

static inline __attribute__((always_inline)) void drawBacklightSlider()
{
  const uint8_t SLIDER_BUTTON_HEIGHT = 10;

  static button_t sliderButton = { SLIDER_XPOS - ( SLIDER_WIDTH / 2 ), 0, SLIDER_WIDTH, SLIDER_BUTTON_HEIGHT };

  tft.startWrite();
  tft.writeFillRect( sliderButton.x, sliderButton.y, sliderButton.w, sliderButton.h, ILI9341_BLACK);
  tft.writeFillRect( SLIDER_XPOS - 2, SLIDER_YPOS, 4, SLIDER_HEIGHT, ILI9341_YELLOW );
  tft.endWrite();

  //drawButton( sliderArea, 0, ILI9341_GREEN ); //debug

  //print percentage above the slider
  sliderButton.y = SLIDER_YPOS - 15;
  snprintf( sliderButton.text, sizeof( sliderButton.text ), " %.0f%% ", tftBrightness ); /* extra spaces to overwrite old value */
  drawButton( sliderButton, ILI9341_YELLOW, 0, 0, 2 );

  //draw the slider knob
  uint16_t ypos = map( tftBrightness, 0, 100, SLIDER_HEIGHT + SLIDER_YPOS, SLIDER_YPOS );
  sliderButton.y = ypos;
  sliderButton.text[0] = 0;
  drawButton( sliderButton, 0, ILI9341_BLUE, 0, 0 );
}

static inline __attribute__((always_inline)) void showIPAddress( button_t area )

  {
    tft.fillScreen( ILI9341_BLACK );
    drawButton( MENU_BUTTON, ILI9341_YELLOW, ILI9341_BLUE, 0, 1 );

    showIPAddress( networkArea );
    currentWiFiStatus = WiFi.status();
