last_light/game/ui/ui.go

30 lines
462 B
Go
Raw Normal View History

2024-04-21 03:48:58 +03:00
package ui
import (
2024-05-06 20:43:35 +03:00
"mvvasilev/last_light/engine"
2024-06-06 23:17:22 +03:00
"mvvasilev/last_light/game/systems"
2024-04-21 03:48:58 +03:00
)
type UIElement interface {
MoveTo(x, y int)
2024-05-06 21:47:20 +03:00
Position() engine.Position
Size() engine.Size
2024-06-06 23:17:22 +03:00
Input(inputAction systems.InputAction)
2024-05-06 20:43:35 +03:00
engine.Drawable
2024-04-24 17:11:33 +03:00
}
type UIHighlightableElement interface {
IsHighlighted() bool
Highlight()
Unhighlight()
SetHighlighted(highlighted bool)
UIElement
}
type UISelectableElement interface {
Select()
OnSelect(func())
2024-05-12 23:22:39 +03:00
UIElement
2024-04-21 03:48:58 +03:00
}