mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-11-07 18:57:18 -05:00
627bc8ec65
this allows us to groups screens together, such that they can be de-/activated by de-/activating the group instead of every ui element by hand. Before we were deactivating buttons and stopped rendering to deactivate ui elements. This tied the renderer to these elements.
20 lines
484 B
Go
20 lines
484 B
Go
package d2ui
|
|
|
|
import (
|
|
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2interface"
|
|
)
|
|
|
|
// Drawable represents an instance that can be drawn
|
|
type Drawable interface {
|
|
Render(target d2interface.Surface) error
|
|
Advance(elapsed float64) error
|
|
GetSize() (width, height int)
|
|
SetPosition(x, y int)
|
|
GetPosition() (x, y int)
|
|
OffsetPosition(xo, yo int)
|
|
GetVisible() bool
|
|
SetVisible(visible bool)
|
|
SetRenderPriority(priority RenderPriority)
|
|
GetRenderPriority() (priority RenderPriority)
|
|
}
|