diff --git a/internal/ui/input_glfw.go b/internal/ui/input_glfw.go index 8d8c053f3..92b4568fc 100644 --- a/internal/ui/input_glfw.go +++ b/internal/ui/input_glfw.go @@ -92,7 +92,7 @@ func (i *Input) AppendInputChars(runes []rune) []rune { return append(runes, i.runeBuffer...) } -func (i *Input) resetForFrame() { +func (i *Input) resetForTick() { if !i.ui.isRunning() { return } diff --git a/internal/ui/input_js.go b/internal/ui/input_js.go index bda10d445..d60a0f1ed 100644 --- a/internal/ui/input_js.go +++ b/internal/ui/input_js.go @@ -101,7 +101,7 @@ func (i *Input) AppendInputChars(runes []rune) []rune { return append(runes, i.runeBuffer...) } -func (i *Input) resetForFrame() { +func (i *Input) resetForTick() { i.runeBuffer = nil i.wheelX = 0 i.wheelY = 0 diff --git a/internal/ui/input_mobile.go b/internal/ui/input_mobile.go index 2b11e5d2a..30de71616 100644 --- a/internal/ui/input_mobile.go +++ b/internal/ui/input_mobile.go @@ -94,6 +94,6 @@ func (i *Input) update(keys map[Key]struct{}, runes []rune, touches []Touch) { i.touches = append(i.touches, touches...) } -func (i *Input) resetForFrame() { +func (i *Input) resetForTick() { i.runes = nil } diff --git a/internal/ui/ui_cbackend.go b/internal/ui/ui_cbackend.go index 53761d7de..2323a74c4 100644 --- a/internal/ui/ui_cbackend.go +++ b/internal/ui/ui_cbackend.go @@ -74,7 +74,7 @@ func (*UserInterface) ScreenSizeInFullscreen() (int, int) { return 0, 0 } -func (*UserInterface) ResetForFrame() { +func (*UserInterface) ResetForTick() { } func (*UserInterface) CursorMode() CursorMode { diff --git a/internal/ui/ui_glfw.go b/internal/ui/ui_glfw.go index f6748f102..4ae220301 100644 --- a/internal/ui/ui_glfw.go +++ b/internal/ui/ui_glfw.go @@ -1349,8 +1349,8 @@ func (u *UserInterface) IsScreenTransparent() bool { return val } -func (u *UserInterface) ResetForFrame() { - u.input.resetForFrame() +func (u *UserInterface) ResetForTick() { + u.input.resetForTick() u.m.Lock() u.windowBeingClosed = false diff --git a/internal/ui/ui_js.go b/internal/ui/ui_js.go index 06675a32c..28e7c9617 100644 --- a/internal/ui/ui_js.go +++ b/internal/ui/ui_js.go @@ -636,8 +636,8 @@ func (u *UserInterface) IsScreenTransparent() bool { return bodyStyle.Get("backgroundColor").Equal(stringTransparent) } -func (u *UserInterface) ResetForFrame() { - u.input.resetForFrame() +func (u *UserInterface) ResetForTick() { + u.input.resetForTick() } func (u *UserInterface) SetInitFocused(focused bool) { diff --git a/internal/ui/ui_mobile.go b/internal/ui/ui_mobile.go index 8536374dd..d13cb6862 100644 --- a/internal/ui/ui_mobile.go +++ b/internal/ui/ui_mobile.go @@ -431,8 +431,8 @@ func (u *UserInterface) IsScreenTransparent() bool { return false } -func (u *UserInterface) ResetForFrame() { - u.input.resetForFrame() +func (u *UserInterface) ResetForTick() { + u.input.resetForTick() } func (u *UserInterface) SetInitFocused(focused bool) { diff --git a/uicontext.go b/uicontext.go index 1ea3a19ce..dc012ce83 100644 --- a/uicontext.go +++ b/uicontext.go @@ -103,7 +103,7 @@ func (c *uiContext) UpdateFrame(updateCount int, screenScale float64, offsetX, o if err := c.game.Update(); err != nil { return err } - ui.Get().ResetForFrame() + ui.Get().ResetForTick() } // Even though updateCount == 0, the offscreen is cleared and Draw is called.