2020-01-31 23:18:11 -05:00
|
|
|
package d2ui
|
|
|
|
|
|
|
|
import (
|
2020-06-28 19:31:10 -04:00
|
|
|
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2interface"
|
2020-01-31 23:18:11 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
// CursorButton represents a mouse button
|
|
|
|
type CursorButton uint8
|
|
|
|
|
|
|
|
const (
|
|
|
|
// CursorButtonLeft represents the left mouse button
|
|
|
|
CursorButtonLeft CursorButton = 1
|
|
|
|
// CursorButtonRight represents the right mouse button
|
|
|
|
CursorButtonRight CursorButton = 2
|
|
|
|
)
|
|
|
|
|
2020-08-06 10:30:23 -04:00
|
|
|
// NewUIManager creates a UIManager instance with the given input and audio provider
|
|
|
|
func NewUIManager(
|
|
|
|
renderer d2interface.Renderer,
|
|
|
|
input d2interface.InputManager,
|
|
|
|
audio d2interface.AudioProvider,
|
|
|
|
) *UIManager {
|
|
|
|
ui := &UIManager{
|
|
|
|
renderer: renderer,
|
|
|
|
inputManager: input,
|
|
|
|
audio: audio,
|
2020-06-23 18:12:08 -04:00
|
|
|
}
|
2020-01-31 23:18:11 -05:00
|
|
|
|
2020-08-06 10:30:23 -04:00
|
|
|
return ui
|
2020-01-31 23:18:11 -05:00
|
|
|
}
|