Esempio n. 1
0
 void OnGUI()
 {
     GUILayout.BeginHorizontal(GUILayout.Width(Screen.width));
     {
         GUILayout.FlexibleSpace();
         for (int controller = 0; controller < OuyaController.MAX_CONTROLLERS; ++controller)
         {
             GUILayout.BeginVertical(GUILayout.Height(Screen.height));
             {
                 foreach (int axis in _axises)
                 {
                     GUILayout.Label(string.Format("({0}) {1} val={2}",
                                                   axis,
                                                   DebugInput.DebugGetAxisName(axis),
                                                   GetAxis(controller, axis, _axis)));
                 }
                 GUILayout.FlexibleSpace();
                 foreach (int button in _buttons)
                 {
                     GUILayout.Label(string.Format("({0}) {1} up={2} down={3}",
                                                   button,
                                                   DebugInput.DebugGetButtonName(button),
                                                   CheckButton(controller, button, _buttonUp),
                                                   CheckButton(controller, button, _buttonDown)));
                 }
             }
             GUILayout.EndVertical();
         }
         GUILayout.FlexibleSpace();
     }
     GUILayout.EndHorizontal();
 }
Esempio n. 2
0
 private void UpdateLabelAxis(out string field, int axis)
 {
     field = DebugInput.DebugGetAxisName(axis) + "=" + OuyaSDK.OuyaInput.GetAxis(PlayerNum, axis);
 }