Make animations work in the options screen
This commit is contained in:
20
internal/ui/noninteractive.go
Normal file
20
internal/ui/noninteractive.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package ui
|
||||
|
||||
import (
|
||||
"github.com/hajimehoshi/ebiten"
|
||||
"image"
|
||||
)
|
||||
|
||||
// A non-interactive element is not a widget; it merely displays some pixels and
|
||||
// may optionally have a tooltip for display within bounds.
|
||||
//
|
||||
// For non-animated non-interactive elements, just give them a single frame.
|
||||
type noninteractive struct {
|
||||
bounds image.Rectangle
|
||||
frames animation
|
||||
tooltip string
|
||||
}
|
||||
|
||||
func (n *noninteractive) image(step int) *ebiten.Image {
|
||||
return n.frames.image(step)
|
||||
}
|
Reference in New Issue
Block a user