Commits

Friedrich Kastner-Masilko committed a83720c

Pages: moved mode key rendering to crane base page

  • Participants
  • Parent commits b9d40ca

Comments (0)

Files changed (2)

File Orbitersdk/samples/AscensionUltra/Pages/CraneBasePage.h

 			case 4: return "Z+";
 			case 5: return "Z-";
 			case 6: return "STP";
+			case 10: return "MOD";
 			case 11: return "BCK";
 			default: return NULL;
 		}
 
 	int MenuRenderer (MFDBUTTONMENU *mnu)
 	{	
-		static MFDBUTTONMENU menu[8] = 
+		static MFDBUTTONMENU menu[9] = 
 		{
 			{"Move X axis", "pos. by step", 'A'},
 			{"Move X axis", "neg. by step", 'D'},
 			{"Move Z axis", "up by step", 'Q'},
 			{"Move Z axis", "down by step", 'E'},
 			{"Toggle step", "size", 'R'},
+			{"Switch mode", "to list", 'M'},
 			{"Go back", NULL, 'B'}
 		};
 		
 		for(int i=0;i<7;i++) mnu[i]=menu[i];
-		mnu[11]=menu[7];
-		return 8;
+		mnu[10]=menu[7];
+		mnu[11]=menu[8];
+		return 12;
 	}
 
 	AscensionTowerPageInstance ButtonHandler(int bt)
 			case 4: return SetKey(OAPI_KEY_Q);
 			case 5: return SetKey(OAPI_KEY_E);
 			case 6: return SetKey(OAPI_KEY_R);
+			case 10: return SetKey(OAPI_KEY_M);
 			case 11: return SetKey(OAPI_KEY_B);
 			default: return Undefined;
 		}

File Orbitersdk/samples/AscensionUltra/Pages/CranePage.h

 		{
 			case 7: return "AUT";
 			case 8: return "SPD";			
-			case 9: return "DIR";
-			case 10: return "MOD";
+			case 9: return "DIR";			
 			default: return CraneBasePage::LabelRenderer(bt);
 		}
 	}
 
 	int MenuRenderer (MFDBUTTONMENU *mnu)
 	{	
-		static MFDBUTTONMENU menu[4] = 
+		static MFDBUTTONMENU menu[3] = 
 		{
 			{"Toggle auto", "sequence", 'O'},
 			{"Set speeds", NULL, 'F'},		
-			{"Toggle direct", "command", 'C'},
-			{"Switch mode", "to list", 'M'}
+			{"Toggle direct", "command", 'C'}
 		};
 		
-		for(int i=0;i<4;i++) mnu[7+i]=menu[i];	
-		return CraneBasePage::MenuRenderer(mnu)+4;
+		for(int i=0;i<3;i++) mnu[7+i]=menu[i];	
+		return CraneBasePage::MenuRenderer(mnu);
 	}
 
 	AscensionTowerPageInstance ButtonHandler(int bt)
 		case 7: return SetKey(OAPI_KEY_O);
 		case 8: return SetKey(OAPI_KEY_F);
 		case 9: return SetKey(OAPI_KEY_C);
-		case 10: return SetKey(OAPI_KEY_M);
 		default: return CraneBasePage::ButtonHandler(bt);
 		}
 	}