diff Discovery/Src/tMenuCustom.c @ 521:e221cf762f45

Move Bigfont and motion Ctrl selection menu out of custom view submenu: Due to lag of space the two options were placed within the custom view sub menu. After introduction of new visualization tab the option may be accessed directly
author Ideenmodellierer
date Thu, 10 Sep 2020 20:47:48 +0200
parents 998529b3e142
children 531e7818b737
line wrap: on
line diff
--- a/Discovery/Src/tMenuCustom.c	Tue Sep 08 21:24:14 2020 +0200
+++ b/Discovery/Src/tMenuCustom.c	Thu Sep 10 20:47:48 2020 +0200
@@ -30,10 +30,12 @@
 #include <stdio.h>
 #include <string.h>
 #include "tMenu.h"
+#include "tHome.h"
 #include "tStructure.h"
 #include "tMenuCustom.h"
 #include "text_multilanguage.h"
 #include "data_central.h"
+#include "motion.h"
 
 
 /* Exported functions --------------------------------------------------------*/
@@ -57,8 +59,31 @@
 
     if((line == 0) || (line == 2))
     {
-        text[textPointer++] = TXT_2BYTE;
-        text[textPointer++] = TXT2BYTE_SelectCustomviews;
+       text[textPointer++] = TXT_2BYTE;
+       text[textPointer++] = TXT2BYTE_ExtraDisplay;
+       text[textPointer++] = ' ';
+       text[textPointer++] = ' ';
+       text[textPointer++] = TXT_2BYTE;
+
+       switch(settingsGetPointer()->extraDisplay)
+       {
+		   /* BigFont */
+		   case EXTRADISPLAY_BIGFONT:
+			   text[textPointer++] = TXT2BYTE_ExtraBigFont;
+			   break;
+		   /* DecoGame */
+		   case EXTRADISPLAY_DECOGAME:
+			   text[textPointer++] = TXT2BYTE_ExtraDecoGame;
+			   break;
+		   /* none */
+		   case EXTRADISPLAY_none:
+			   text[textPointer++] = TXT2BYTE_ExtraNone;
+			   break;
+
+		   default:
+			   snprintf(&text[textPointer++],2,"%u",settingsGetPointer()->extraDisplay);
+       break;
+       }
     }
     strcpy(&text[textPointer],"\n\r");
     textPointer += 2;
@@ -66,11 +91,52 @@
     if((line == 0) || (line == 3))
     {
         text[textPointer++] = TXT_2BYTE;
+        text[textPointer++] = TXT2BYTE_SelectCustomviews;
+    }
+    strcpy(&text[textPointer],"\n\r");
+    textPointer += 2;
+
+    if((line == 0) || (line == 4))
+    {
+        text[textPointer++] = TXT_2BYTE;
         text[textPointer++] = TXT2BYTE_SelectBigFont;
     }
     strcpy(&text[textPointer],"\n\r");
     textPointer += 2;
 
+#ifdef ENABLE_MOTION_CONTROL
+    if((line == 0) || (line == 5))
+    {
+    /* MotionCtrl */
+		text[textPointer++] = TXT_2BYTE;
+		text[textPointer++] = TXT2BYTE_MotionCtrl;
+		text[textPointer++] = ' ';
+		text[textPointer++] = ' ';
+		text[textPointer++] = TXT_2BYTE;
+		switch(settingsGetPointer()->MotionDetection)
+		{
+			case MOTION_DETECT_OFF:
+				text[textPointer++] = TXT2BYTE_MoCtrlNone;
+				break;
+			case MOTION_DETECT_MOVE:
+				text[textPointer++] = TXT2BYTE_MoCtrlPitch;
+				break;
+			case MOTION_DETECT_SECTOR:
+				text[textPointer++] = TXT2BYTE_MoCtrlSector;
+				break;
+			case MOTION_DETECT_SCROLL:
+				text[textPointer++] = TXT2BYTE_MoCtrlScroll;
+						break;
+			default:
+				snprintf(&text[4],2,"%u",settingsGetPointer()->MotionDetection);
+				textPointer++;
+			break;
+		}
+		strcpy(&text[textPointer],"\n\r");
+		textPointer += 2;
+    }
+#endif
+
     return StMCustom;
 }