mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-09-28 14:16:01 -04:00
aa1fca84d5
not all widgets need to be clickable, so let's make it it's own interface.
19 lines
359 B
Go
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()
|
|
}
|