Example #1
0
// IsGamepadButtonPressed returns the boolean indicating the buttons is pressed or not.
//
// This function is concurrent-safe.
//
// The key states vary depending on environments.
// There can be differences even between Chrome and Firefox.
// Don't assume that states of a keys are always same when same buttons are pressed.
//
// NOTE: Gamepad API is available only on desktops, Chrome and Firefox.
// To use this API, browsers might require rebooting the browser.
func IsGamepadButtonPressed(id int, button GamepadButton) bool {
	return ui.CurrentInput().IsGamepadButtonPressed(id, ui.GamepadButton(button))
}
Example #2
0
// IsGamepadButtonPressed returns the boolean indicating the buttons is pressed or not.
//
// NOTE: Gamepad API is available only on desktops, Chrome and Firefox.
// To use this API, browsers might require rebooting the browser.
func IsGamepadButtonPressed(id int, button GamepadButton) bool {
	return ui.IsGamepadButtonPressed(id, ui.GamepadButton(button))
}