added title and footer text when starting or stopping network mode
authorHolger Schemel <info@artsoft.org>
Mon, 1 Oct 2018 20:03:32 +0000 (22:03 +0200)
committerHolger Schemel <info@artsoft.org>
Mon, 1 Oct 2018 20:03:32 +0000 (22:03 +0200)
src/screens.c

index 6dd964f..4967ebd 100644 (file)
@@ -5953,6 +5953,12 @@ static void execGadgetNetworkServer(void)
 
 static void ToggleNetworkModeIfNeeded(void)
 {
+  int font_title = FONT_TITLE_1;
+  int font_foot = FC_BLUE;
+  int ystart  = mSY - SY + 16;
+  int ybottom = mSY - SY + SYSIZE - 20;
+  char *text = (setup.network_mode ? "Start Network" : "Stop Network");
+
   if (setup.network_mode == network.enabled)
     return;
 
@@ -5962,6 +5968,8 @@ static void ToggleNetworkModeIfNeeded(void)
 
   ClearField();
 
+  DrawTextSCentered(ystart, font_title, text);
+
   FadeIn(REDRAW_ALL);
 
   if (network.enabled)
@@ -5969,6 +5977,9 @@ static void ToggleNetworkModeIfNeeded(void)
   else
     DisconnectFromNetworkServer();
 
+  DrawTextSCentered(ybottom, font_foot,
+                   "Press any key or button for setup menu");
+
   DrawSetupScreen();
 }