mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-11-18 02:16:23 -05:00
acc4c7a13e
* fixed lint errors in button.go * fixed lint errors in checkbox.go * Removed d2ui singleton, fixed nearly all lint errors - Changed `UI` struct to `UIManager`, removed singleton - UI element provider functions are now methods of the UI Manager - Screens now use the UI manager to create UI elements - game panels in d2player now use the UI Manager to create UI elements - Only the UI manager knows about "widgets"; calls to `d2ui.AddWidget` in Screen instances have been removed * changed ui element provider methods from `Create` to `New`
17 lines
365 B
Go
17 lines
365 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)
|
|
GetVisible() bool
|
|
SetVisible(visible bool)
|
|
}
|