mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 11:48:55 +01:00
uidriver/js: Update go2cpp touch API
This commit is contained in:
parent
8e6792ca23
commit
601fd5eb22
@ -417,9 +417,9 @@ func (i *Input) updateForGo2Cpp() {
|
|||||||
i.touches = map[driver.TouchID]pos{}
|
i.touches = map[driver.TouchID]pos{}
|
||||||
touchCount := go2cpp.Get("touchCount").Int()
|
touchCount := go2cpp.Get("touchCount").Int()
|
||||||
for idx := 0; idx < touchCount; idx++ {
|
for idx := 0; idx < touchCount; idx++ {
|
||||||
id := go2cpp.Call("getTouchPositionId", idx)
|
id := go2cpp.Call("getTouchId", idx)
|
||||||
x := go2cpp.Call("getTouchPositionX", idx)
|
x := go2cpp.Call("getTouchX", idx)
|
||||||
y := go2cpp.Call("getTouchPositionY", idx)
|
y := go2cpp.Call("getTouchY", idx)
|
||||||
i.touches[driver.TouchID(id.Int())] = pos{
|
i.touches[driver.TouchID(id.Int())] = pos{
|
||||||
X: x.Int(),
|
X: x.Int(),
|
||||||
Y: y.Int(),
|
Y: y.Int(),
|
||||||
|
Loading…
Reference in New Issue
Block a user