1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-09-28 14:16:01 -04:00
OpenDiablo2/d2core/d2ui/widget.go
juander aa1fca84d5 d2core/ui: Introduce clickable widgets
not all widgets need to be clickable, so let's make it it's own
interface.
2020-11-09 18:13:17 +01:00

19 lines
359 B
Go

package d2ui
// Widget defines an object that is a UI widget
type Widget interface {
Drawable
bindManager(ui *UIManager)
}
// ClickableWidget defines an object that can be clicked
type ClickableWidget interface {
Widget
SetEnabled(enabled bool)
SetPressed(pressed bool)
GetEnabled() bool
GetPressed() bool
OnActivated(callback func())
Activate()
}