1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-11-19 02:46:35 -05:00
OpenDiablo2/d2core/d2term/d2term.go

21 lines
466 B
Go
Raw Normal View History

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) (d2interface.Terminal, error) {
2020-06-28 21:40:52 -04:00
term, err := createTerminal()
if err != nil {
2020-06-28 21:40:52 -04:00
return nil, err
}
if err := inputManager.BindHandlerWithPriority(term, d2enum.PriorityHigh); err != nil {
2020-06-28 21:40:52 -04:00
return nil, err
2020-02-09 14:12:04 -05:00
}
2020-06-28 21:40:52 -04:00
return term, nil
2020-02-09 14:12:04 -05:00
}