mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-11-10 06:16:27 -05:00
60e6fcb7ac
* moved filter constants back to d2enum * moving key and mouse button enums into d2enum * moving render type enum into d2enum * moving input even priority enums into d2enum * moving terminal enums into d2enum
22 lines
491 B
Go
22 lines
491 B
Go
package d2term
|
|
|
|
import (
|
|
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2enum"
|
|
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2interface"
|
|
"github.com/OpenDiablo2/OpenDiablo2/d2core/d2input"
|
|
)
|
|
|
|
// Initialize creates and initializes the terminal
|
|
func Initialize() (d2interface.Terminal, error) {
|
|
term, err := createTerminal()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if err := d2input.BindHandlerWithPriority(term, d2enum.PriorityHigh); err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return term, nil
|
|
}
|