ebiten: Add inpututil guide comments for Is{Key,MouseButton,Gamepad}Pressed and TouchIDs (#1346)

Fixes #1344
This commit is contained in:
raa0121 2020-09-15 19:29:07 +09:00 committed by GitHub
parent 3d333d5be7
commit e3e8b49047
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,6 +38,9 @@ func InputChars() []rune {
// IsKeyPressed returns a boolean indicating whether key is pressed.
//
// If you want to know whether the key started being pressed in the current frame,
// use inpututil.IsKeyJustPressed
//
// Known issue: On Edge browser, some keys don't work well:
//
// - KeyKPEnter and KeyKPEqual are recognized as KeyEnter and KeyEqual.
@ -92,6 +95,9 @@ func Wheel() (xoff, yoff float64) {
// IsMouseButtonPressed returns a boolean indicating whether mouseButton is pressed.
//
// If you want to know whether the mouseButton started being pressed in the current frame,
// use inpututil.IsMouseButtonJustPressed
//
// IsMouseButtonPressed is concurrent-safe.
//
// Note that touch events not longer affect IsMouseButtonPressed's result as of 1.4.0-alpha.
@ -163,6 +169,9 @@ func GamepadButtonNum(id int) int {
// IsGamepadButtonPressed returns the boolean indicating the given button of the gamepad (id) is pressed or not.
//
// If you want to know whether the given button of gamepad (id) started being pressed in the current frame,
// use inpututil.IsGamepadButtonJustPressed
//
// IsGamepadButtonPressed is concurrent-safe.
//
// The relationships between physical buttons and buttion IDs depend on environments.
@ -175,6 +184,9 @@ func IsGamepadButtonPressed(id int, button GamepadButton) bool {
// TouchIDs returns the current touch states.
//
// If you want to know whether a touch started being pressed in the current frame,
// use inpututil.JustPressedTouchIDs
//
// TouchIDs returns nil when there are no touches.
// TouchIDs always returns nil on desktops.
//