void DrawState(GamePad.PlayerIndex controller) { GUILayout.Space(45); GUILayout.BeginVertical(); GamepadState state = GamePad.GetState(controller); // buttons GUILayout.Label("Gamepad " + controller); GUILayout.Label("" + state.A); GUILayout.Label("" + state.B); GUILayout.Label("" + state.X); GUILayout.Label("" + state.Y); GUILayout.Label("" + state.Start); GUILayout.Label("" + state.Back); GUILayout.Label("" + state.LeftShoulder); GUILayout.Label("" + state.RightShoulder); GUILayout.Label("" + state.Left); GUILayout.Label("" + state.Right); GUILayout.Label("" + state.Up); GUILayout.Label("" + state.Down); GUILayout.Label("" + state.LeftStick); GUILayout.Label("" + state.RightStick); GUILayout.Label(""); // triggers GUILayout.Label("" + System.Math.Round(state.LeftTrigger, 2)); GUILayout.Label("" + System.Math.Round(state.RightTrigger, 2)); GUILayout.Label(""); // Axes GUILayout.Label("" + state.LeftStickAxis); GUILayout.Label("" + state.rightStickAxis); GUILayout.Label("" + state.dPadAxis); //GUILayout.EndArea(); GUILayout.EndVertical(); }