Ignore inputs when the on-screen controls are in configuration mode

This commit is contained in:
Cameron Gutman 2016-01-19 18:31:00 -05:00
parent b58ac367ee
commit 49ddfa573d

View File

@ -666,6 +666,12 @@ public class Game extends Activity implements SurfaceHolder.Callback,
// This case is for touch-based input devices
else
{
if (virtualController != null &&
virtualController.getControllerMode() == VirtualController.ControllerMode.Configuration) {
// Ignore presses when the virtual controller is in configuration mode
return true;
}
int actionIndex = event.getActionIndex();
int eventX = (int)event.getX(actionIndex);