mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
ui: Remove UpdateTouches
This commit is contained in:
parent
43ec1e7fb3
commit
5d6f66935a
@ -122,8 +122,12 @@ func AdjustedTouches() []*input.Touch {
|
||||
ts := input.Get().Touches()
|
||||
adjusted := make([]*input.Touch, len(ts))
|
||||
for i, t := range ts {
|
||||
x, y := adjustPosition(t.Position())
|
||||
adjusted[i] = input.NewTouch(t.ID(), x, y)
|
||||
x, y := adjustPosition(t.X, t.Y)
|
||||
adjusted[i] = &input.Touch{
|
||||
ID: t.ID,
|
||||
X: x,
|
||||
Y: y,
|
||||
}
|
||||
}
|
||||
return adjusted
|
||||
}
|
||||
|
@ -140,7 +140,7 @@ func appMain(a app.App) {
|
||||
for _, t := range touches {
|
||||
ts = append(ts, t)
|
||||
}
|
||||
UpdateTouches(ts)
|
||||
input.Get().UpdateTouches(ts)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -434,10 +434,6 @@ func SetVsyncEnabled(enabled bool) {
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
func UpdateTouches(touches []*input.Touch) {
|
||||
input.Get().UpdateTouches(touches)
|
||||
}
|
||||
|
||||
func DeviceScaleFactor() float64 {
|
||||
return getDeviceScale()
|
||||
}
|
||||
|
@ -18,7 +18,6 @@ package mobile
|
||||
|
||||
import (
|
||||
"github.com/hajimehoshi/ebiten/internal/input"
|
||||
"github.com/hajimehoshi/ebiten/internal/ui"
|
||||
)
|
||||
|
||||
type position struct {
|
||||
@ -39,5 +38,5 @@ func updateTouches() {
|
||||
Y: position.y,
|
||||
})
|
||||
}
|
||||
ui.UpdateTouches(ts)
|
||||
input.Get().UpdateTouches(ts)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user