Пример #1
0
 //returns the custom names of the buttons
 public string GetButtonName(JoyCode j)
 {
     string name = _buttons.GetButtonName((JoyCode)j);
     return (name == "")? j.ToString() : name;
 }
Пример #2
0
    //returns the appropriate name for the given string
    string GetControllerKeyName(JoyCode jc, int jplayer)
    {
        ControllerManager.JoyInterface ji = CMRef.GetController(jplayer);

        if(ji != null)
        {
            return "P" + jplayer + " " + ji.GetButtonName(jc);
        }
        else
        {
            return "P" + jplayer + " " + jc.ToString();
        }
    }