Ver código fonte

Modified the back button callback to hide keyboard if its showing

Tim Newell 12 anos atrás
pai
commit
2945aea0af
1 arquivos alterados com 10 adições e 3 exclusões
  1. 10 3
      main.cs

+ 10 - 3
main.cs

@@ -69,9 +69,16 @@ function onExit()
 
 function androidBackButton(%val)
 {
-	//You will want to change this for your game.  Android users expect the 
-	//back button to go back until you reach main menu then it should quit app
-	if (%val)
+	if (%val) {
+		if (isAndroidKeyboardShowing())
+		{
+			toggleAndroidKeyboard(false);
+			return;
+		}
+
+		//Add code here for other options the back button can do like going back a screen.  the quit should happen at your main menu.
+
 		quit();
+	}
 
 }