input: Rename UpdateTouches -> SetTouches

This commit is contained in:
Hajime Hoshi 2019-03-31 16:28:50 +09:00
parent 06219db2cc
commit 64d3e26fb0
3 changed files with 3 additions and 3 deletions

View File

@ -46,7 +46,7 @@ func (i *Input) IsMouseButtonPressed(key driver.MouseButton) bool {
return false return false
} }
func (i *Input) UpdateTouches(touches []*Touch) { func (i *Input) SetTouches(touches []*Touch) {
i.m.Lock() i.m.Lock()
i.touches = touches // TODO: Need copy? i.touches = touches // TODO: Need copy?
i.m.Unlock() i.m.Unlock()

View File

@ -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)
} }
input.Get().UpdateTouches(ts) input.Get().SetTouches(ts)
} }
} }
} }

View File

@ -38,5 +38,5 @@ func updateTouches() {
Y: position.y, Y: position.y,
}) })
} }
input.Get().UpdateTouches(ts) input.Get().SetTouches(ts)
} }