1
0
Fork 0
tetris-go/game/ui/widget.go

18 lines
303 B
Go

package ui
import (
"tetris/engine/core"
)
// Widget is a base widget (Can be drawn on screen)
type Widget interface {
Size() core.Vec2i
Draw(x, y int32)
}
// InputWidget is a widget that also handles user input and can have focus.
type InputWidget interface {
Widget
Focusable
ReceivesInput
}