19 lines
340 B
Go
19 lines
340 B
Go
|
package tins2020
|
||
|
|
||
|
import "github.com/veandco/go-sdl2/sdl"
|
||
|
|
||
|
type Control interface {
|
||
|
Init(*Context) error
|
||
|
Handle(*Context, sdl.Event)
|
||
|
Render(*Context)
|
||
|
}
|
||
|
|
||
|
type ControlBase struct {
|
||
|
}
|
||
|
|
||
|
func (b *ControlBase) Handle(*Context, sdl.Event) {}
|
||
|
|
||
|
func (b *ControlBase) Render(*Context) {}
|
||
|
|
||
|
func (b *ControlBase) Init(*Context) error { return nil }
|