ebiten: github.com/hajimehoshi/ebiten/inpututil Index | Files

package inpututil

import "github.com/hajimehoshi/ebiten/inpututil"

Package inpututil provides utility functions of input like keyboard or mouse.

Index

Package Files

inpututil.go

func GamepadButtonPressDuration Uses

func GamepadButtonPressDuration(id int, button ebiten.GamepadButton) int

GamepadButtonPressDuration returns how long the gamepad button of the gamepad id is pressed in frames.

GamepadButtonPressDuration is concurrent safe.

func IsGamepadButtonJustPressed Uses

func IsGamepadButtonJustPressed(id int, button ebiten.GamepadButton) bool

IsGamepadButtonJustPressed returns a boolean value indicating whether the given gamepad button of the gamepad id is pressed just in the current frame.

IsGamepadButtonJustPressed is concurrent safe.

func IsGamepadButtonJustReleased Uses

func IsGamepadButtonJustReleased(id int, button ebiten.GamepadButton) bool

IsGamepadButtonJustReleased returns a boolean value indicating whether the given gamepad button of the gamepad id is released just in the current frame.

IsGamepadButtonJustReleased is concurrent safe.

func IsGamepadJustDisconnected Uses

func IsGamepadJustDisconnected(id int) bool

IsGamepadJustDisconnected returns a boolean value indicating whether the gamepad of the given id is released just in the current frame.

IsGamepadJustDisconnected is concurrent safe.

func IsKeyJustPressed Uses

func IsKeyJustPressed(key ebiten.Key) bool

IsKeyJustPressed returns a boolean value indicating whether the given key is pressed just in the current frame.

IsKeyJustPressed is concurrent safe.

func IsKeyJustReleased Uses

func IsKeyJustReleased(key ebiten.Key) bool

IsKeyJustReleased returns a boolean value indicating whether the given key is released just in the current frame.

IsKeyJustReleased is concurrent safe.

func IsMouseButtonJustPressed Uses

func IsMouseButtonJustPressed(button ebiten.MouseButton) bool

IsMouseButtonJustPressed returns a boolean value indicating whether the given mouse button is pressed just in the current frame.

IsMouseButtonJustPressed is concurrent safe.

func IsMouseButtonJustReleased Uses

func IsMouseButtonJustReleased(button ebiten.MouseButton) bool

IsMouseButtonJustReleased returns a boolean value indicating whether the given mouse button is released just in the current frame.

IsMouseButtonJustReleased is concurrent safe.

func IsTouchJustReleased Uses

func IsTouchJustReleased(id int) bool

IsTouchJustReleased returns a boolean value indicating whether the given touch is released just in the current frame.

IsTouchJustReleased is concurrent safe.

func JustConnectedGamepadIDs Uses

func JustConnectedGamepadIDs() []int

JustConnectedGamepadIDs returns gamepad IDs that are connected just in the current frame.

JustConnectedGamepadIDs might return nil when there is no connected gamepad.

JustConnectedGamepadIDs is concurrent safe.

func JustPressedTouchIDs Uses

func JustPressedTouchIDs() []int

JustPressedTouchIDs returns touch IDs that are created just in the current frame.

JustPressedTouchIDs might return nil when there is not touch.

JustPressedTouchIDs is concurrent safe.

func KeyPressDuration Uses

func KeyPressDuration(key ebiten.Key) int

KeyPressDuration returns how long the key is pressed in frames.

KeyPressDuration is concurrent safe.

func MouseButtonPressDuration Uses

func MouseButtonPressDuration(button ebiten.MouseButton) int

MouseButtonPressDuration returns how long the mouse button is pressed in frames.

MouseButtonPressDuration is concurrent safe.

func TouchPressDuration Uses

func TouchPressDuration(id int) int

TouchPressDuration returns how long the touch remains in frames.

TouchPressDuration is concurrent safe.

Package inpututil imports 4 packages (graph) and is imported by 21 packages. Updated 2019-03-10. Refresh now. Tools for package owners.