mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08: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()
|
ts := input.Get().Touches()
|
||||||
adjusted := make([]*input.Touch, len(ts))
|
adjusted := make([]*input.Touch, len(ts))
|
||||||
for i, t := range ts {
|
for i, t := range ts {
|
||||||
x, y := adjustPosition(t.Position())
|
x, y := adjustPosition(t.X, t.Y)
|
||||||
adjusted[i] = input.NewTouch(t.ID(), x, y)
|
adjusted[i] = &input.Touch{
|
||||||
|
ID: t.ID,
|
||||||
|
X: x,
|
||||||
|
Y: y,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return adjusted
|
return adjusted
|
||||||
}
|
}
|
||||||
|
@ -140,7 +140,7 @@ func appMain(a app.App) {
|
|||||||
for _, t := range touches {
|
for _, t := range touches {
|
||||||
ts = append(ts, t)
|
ts = append(ts, t)
|
||||||
}
|
}
|
||||||
UpdateTouches(ts)
|
input.Get().UpdateTouches(ts)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -434,10 +434,6 @@ func SetVsyncEnabled(enabled bool) {
|
|||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
func UpdateTouches(touches []*input.Touch) {
|
|
||||||
input.Get().UpdateTouches(touches)
|
|
||||||
}
|
|
||||||
|
|
||||||
func DeviceScaleFactor() float64 {
|
func DeviceScaleFactor() float64 {
|
||||||
return getDeviceScale()
|
return getDeviceScale()
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,6 @@ package mobile
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/hajimehoshi/ebiten/internal/input"
|
"github.com/hajimehoshi/ebiten/internal/input"
|
||||||
"github.com/hajimehoshi/ebiten/internal/ui"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type position struct {
|
type position struct {
|
||||||
@ -39,5 +38,5 @@ func updateTouches() {
|
|||||||
Y: position.y,
|
Y: position.y,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
ui.UpdateTouches(ts)
|
input.Get().UpdateTouches(ts)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user