1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-11-05 09:47:18 -05:00
OpenDiablo2/d2core/d2screen/d2screen.go
gravestench 6e31cfb52a
migrate to ebiten v2.0 API (#860)
* migrate to ebiten v2.0 API

* fixed lint errors
2020-10-28 14:17:42 -04:00

32 lines
895 B
Go

package d2screen
import (
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2interface"
)
// Screen is an exported interface
type Screen interface{}
// ScreenLoadHandler is an exported interface
type ScreenLoadHandler interface {
// OnLoad performs all necessary loading to prepare a screen to be shown such as loading assets, placing and binding
// of ui elements, etc. This loading is done asynchronously. The provided channel will allow implementations to
// provide progress via Error, Progress, or Done
OnLoad(loading LoadingState)
}
// ScreenUnloadHandler is an exported interface
type ScreenUnloadHandler interface {
OnUnload() error
}
// ScreenRenderHandler is an exported interface
type ScreenRenderHandler interface {
Render(target d2interface.Surface)
}
// ScreenAdvanceHandler is an exported interface
type ScreenAdvanceHandler interface {
Advance(elapsed float64) error
}