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