integrate button.Parser
parent
896f5e9c92
commit
2af373aed7
|
|
@ -11,5 +11,5 @@ type Parser interface {
|
|||
}
|
||||
|
||||
func New(ctx context.Context, src raw.Raw) Parser {
|
||||
panic(nil)
|
||||
return NewPlaintext(src)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,16 +2,18 @@ package input
|
|||
|
||||
import (
|
||||
"context"
|
||||
"mayhem-party/src/device/input/button"
|
||||
"mayhem-party/src/device/input/raw"
|
||||
"mayhem-party/src/device/input/wrap"
|
||||
)
|
||||
|
||||
type Input interface {
|
||||
Read() []wrap.Button
|
||||
Read() []button.Button
|
||||
Close()
|
||||
}
|
||||
|
||||
func New(ctx context.Context) Input {
|
||||
src := raw.New(ctx)
|
||||
return wrap.New(ctx, src)
|
||||
parser := button.New(ctx, src)
|
||||
return wrap.New(ctx, parser)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue