2020-02-01 04:18:11 +00:00
|
|
|
package d2ui
|
2019-10-25 22:40:27 +00:00
|
|
|
|
2020-06-29 04:41:58 +00:00
|
|
|
import (
|
|
|
|
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2interface"
|
|
|
|
)
|
2019-10-25 22:40:27 +00:00
|
|
|
|
|
|
|
// Drawable represents an instance that can be drawn
|
|
|
|
type Drawable interface {
|
2020-11-11 13:55:59 +00:00
|
|
|
Render(target d2interface.Surface)
|
2020-08-06 14:30:23 +00:00
|
|
|
Advance(elapsed float64) error
|
2019-12-22 01:53:18 +00:00
|
|
|
GetSize() (width, height int)
|
|
|
|
SetPosition(x, y int)
|
|
|
|
GetPosition() (x, y int)
|
2020-11-06 11:38:20 +00:00
|
|
|
OffsetPosition(xo, yo int)
|
2019-10-25 22:40:27 +00:00
|
|
|
GetVisible() bool
|
2019-10-26 02:20:36 +00:00
|
|
|
SetVisible(visible bool)
|
2020-11-06 12:28:24 +00:00
|
|
|
SetRenderPriority(priority RenderPriority)
|
|
|
|
GetRenderPriority() (priority RenderPriority)
|
2019-10-25 22:40:27 +00:00
|
|
|
}
|