private string GetInputStatsText(GamepadInput input) { // Determine all pressed gamepad buttons string activeButtons = ""; foreach (GamepadButton button in Enum.GetValues(typeof(GamepadButton))) { if (input.ButtonPressed(button)) { if (activeButtons.Length != 0) { activeButtons += ", "; } activeButtons += button.ToString(); } } return (string.Format("Id: /cFF8800FF{0}/cFFFFFFFF/n", input.Id) + string.Format("ProductId: /cFF8800FF{0}/cFFFFFFFF/n", input.ProductId) + string.Format("ProductName: /cFF8800FF{0}/cFFFFFFFF/n", input.ProductName) + string.Format("IsAvailable: /cFF8800FF{0}/cFFFFFFFF/n", input.IsAvailable) + string.Format("Buttons: /c44AAFFFF{0}/cFFFFFFFF/n", activeButtons) + string.Format("Left Trigger: /c44AAFFFF{0}/cFFFFFFFF/n", input.LeftTrigger) + string.Format("Left Thumbstick: /c44AAFFFF{0}/cFFFFFFFF/n", input.LeftThumbstick) + string.Format("Right Trigger: /c44AAFFFF{0}/cFFFFFFFF/n", input.RightTrigger) + string.Format("Right Thumbstick: /c44AAFFFF{0}/cFFFFFFFF/n", input.RightThumbstick) + string.Format("Directional Pad: /c44AAFFFF{0}/cFFFFFFFF", input.DPad)); }
private string GetInputStatsText(GamepadInput input) { // Determine all pressed gamepad buttons string activeButtons = ""; foreach (GamepadButton button in Enum.GetValues(typeof(GamepadButton))) { if (input.ButtonPressed(button)) { if (activeButtons.Length != 0) activeButtons += ", "; activeButtons += button.ToString(); } } return string.Format("Description: /cFF8800FF{0}/cFFFFFFFF/n", input.Description) + string.Format("IsAvailable: /cFF8800FF{0}/cFFFFFFFF/n", input.IsAvailable) + string.Format("Buttons: /c44AAFFFF{0}/cFFFFFFFF/n", activeButtons) + string.Format("Left Trigger: /c44AAFFFF{0}/cFFFFFFFF/n", input.LeftTrigger) + string.Format("Left Thumbstick: /c44AAFFFF{0}/cFFFFFFFF/n", input.LeftThumbstick) + string.Format("Right Trigger: /c44AAFFFF{0}/cFFFFFFFF/n", input.RightTrigger) + string.Format("Right Thumbstick: /c44AAFFFF{0}/cFFFFFFFF/n", input.RightThumbstick) + string.Format("Directional Pad: /c44AAFFFF{0}/cFFFFFFFF", input.DPad); }