integrate button.Parser
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user