mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
inpututil: Rename JustPressedTouches -> JustPressedTouchIDs
This commit is contained in:
parent
342551da8d
commit
db3effe65a
@ -182,7 +182,7 @@ func jump() bool {
|
||||
if inpututil.IsMouseButtonJustPressed(ebiten.MouseButtonLeft) {
|
||||
return true
|
||||
}
|
||||
if len(inpututil.JustPressedTouches()) > 0 {
|
||||
if len(inpututil.JustPressedTouchIDs()) > 0 {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
|
@ -294,12 +294,12 @@ func GamepadButtonPressDuration(id int, button ebiten.GamepadButton) int {
|
||||
return s
|
||||
}
|
||||
|
||||
// JustPressedTouches returns touch IDs that are created just in the current frame.
|
||||
// JustPressedTouchIDs returns touch IDs that are created just in the current frame.
|
||||
//
|
||||
// JustPressedTouches might return nil when there is not touch.
|
||||
// JustPressedTouchIDs might return nil when there is not touch.
|
||||
//
|
||||
// JustPressedTouches is concurrent safe.
|
||||
func JustPressedTouches() []int {
|
||||
// JustPressedTouchIDs is concurrent safe.
|
||||
func JustPressedTouchIDs() []int {
|
||||
var ids []int
|
||||
theInputState.m.RLock()
|
||||
for id, s := range theInputState.touchDurations {
|
||||
|
Loading…
Reference in New Issue
Block a user