public static string ToValue(this PSButton value) { var i = (int)value; if (i < strings.Length) { return(strings[i]); } else { return("none"); } }
/// <summary> /// Returns true during the frame the user released the button. /// </summary> /// <param name="btn"></param> /// <returns></returns> public bool Released(PSButton btn) { return(Released((CButton)btn)); }
/// <summary> /// Returns true during the frame the user pressed the button. /// </summary> /// <param name="btn"></param> /// <returns></returns> public bool Pressed(PSButton btn) { return(Pressed((CButton)btn)); }
/// <summary> /// Returns true while the button is pressed. /// </summary> /// <param name="btn"></param> /// <returns></returns> public bool Button(PSButton btn) { return(Button((CButton)btn)); }
/// <summary> /// Returns the state of button <paramref name="btn"/> of player <paramref name="id"/> using a playstation controller layout. /// </summary> /// <param name="btn"></param> /// <param name="id"></param> /// <returns></returns> public static bool GetButton(PSButton btn, PlayerIndex id = PlayerIndex.Any) { return(GetButton((CButton)btn, id)); }