1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-11-10 06:16:27 -05:00
OpenDiablo2/d2core/d2term/d2term.go
dk 60e6fcb7ac
moving enumerations out of d2interface (#552)
* 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
2020-07-06 21:26:08 -04:00

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
}