mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-11-09 03:37:17 -05:00
6e31cfb52a
* migrate to ebiten v2.0 API * fixed lint errors
32 lines
895 B
Go
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
|
|
}
|