mirror of
https://github.com/mrusme/neonmodem.git
synced 2024-12-04 14:46:37 -05:00
Extended UI Context with Config, Logger
This commit is contained in:
parent
fbc0cea73a
commit
96364d8735
@ -1,19 +1,30 @@
|
||||
package ctx
|
||||
|
||||
import "github.com/mrusme/gobbs/system"
|
||||
import (
|
||||
"github.com/mrusme/gobbs/config"
|
||||
"github.com/mrusme/gobbs/system"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
type Ctx struct {
|
||||
Screen [2]int
|
||||
Content [2]int
|
||||
Config *config.Config
|
||||
Systems []*system.System
|
||||
Loading bool
|
||||
Logger *zap.SugaredLogger
|
||||
}
|
||||
|
||||
func New() Ctx {
|
||||
func New(
|
||||
cfg *config.Config,
|
||||
logger *zap.SugaredLogger,
|
||||
) Ctx {
|
||||
return Ctx{
|
||||
Screen: [2]int{0, 0},
|
||||
Content: [2]int{0, 0},
|
||||
Config: cfg,
|
||||
Loading: false,
|
||||
Logger: logger,
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user