예제 #1
0
 //Constructor general:
 InstructionData(String phrase, InstructionData_CommandType type, int value, bool control = false, bool shift = false, bool isValid = false)
 {
     this.lCasePhrase = phrase.ToLower();
     this.commandType = type;
     this.value = value;
     this.control = control;
     this.shift = shift;
     this.isValid = isValid;
     this.axis = -1;
 }
예제 #2
0
        //Constructor para comandos de botones del joystick:
        InstructionData(String phrase, InstructionData_CommandType type, int button)
        {
            this.lCasePhrase = phrase.ToLower();
            this.commandType = type;
            this.value = button;

            this.axis = -1;
            this.control = false;
            this.shift = false;
            this.isValid = true;
        }
예제 #3
0
 public static String GetString(InstructionData_CommandType type)
 {
     switch (type)
     {
         case InstructionData_CommandType.JOYSTICKAXIS:
             return COMMANDTYPESTRING_JOYSTICKAXIS;
         case InstructionData_CommandType.JOYSTICKBUTTON_PRESS:
             return COMMANDTYPESTRING_JOYSTICKBUTTON_PRESS;
         case InstructionData_CommandType.JOYSTICKBUTTON_HOLD:
             return COMMANDTYPESTRING_JOYSTICKBUTTON_HOLD;
         case InstructionData_CommandType.JOYSTICKBUTTON_RELEASE:
             return COMMANDTYPESTRING_JOYSTICKBUTTON_RELEASE;
         case InstructionData_CommandType.KEYBOARD_PRESS:
             return COMMANDTYPESTRING_KEYBOARD_PRESS;
         case InstructionData_CommandType.KEYBOARD_HOLD:
             return COMMANDTYPESTRING_KEYBOARD_HOLD;
         case InstructionData_CommandType.KEYBOARD_RELEASE:
             return COMMANDTYPESTRING_KEYBOARD_RELEASE;
         default:
             return "";
     }
 }