18 lines
303 B
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
|
|
}
|