1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-11-17 18:06:03 -05:00
OpenDiablo2/d2core/d2term/d2term.go
2020-12-21 21:46:58 +01:00

21 lines
452 B
Go

package d2term
import (
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2enum"
"github.com/OpenDiablo2/OpenDiablo2/d2common/d2interface"
)
// New creates and initializes the terminal
func New(inputManager d2interface.InputManager) (*Terminal, error) {
term, err := NewTerminal()
if err != nil {
return nil, err
}
if err := inputManager.BindHandlerWithPriority(term, d2enum.PriorityHigh); err != nil {
return nil, err
}
return term, nil
}