mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
internal/ui: rename ResetForFrame -> ResetForTick
Resetting happens every tick, not every frame.
This commit is contained in:
parent
a2cb9fda82
commit
9b2f0b6c56
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ func (*UserInterface) ScreenSizeInFullscreen() (int, int) {
|
||||
return 0, 0
|
||||
}
|
||||
|
||||
func (*UserInterface) ResetForFrame() {
|
||||
func (*UserInterface) ResetForTick() {
|
||||
}
|
||||
|
||||
func (*UserInterface) CursorMode() CursorMode {
|
||||
|
@ -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
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user