1
0
mirror of https://github.com/mrusme/neonmodem.git synced 2024-06-16 06:25:23 +00:00

Extended UI Context with Config, Logger

This commit is contained in:
マリウス 2022-12-29 14:33:12 -05:00
parent fbc0cea73a
commit 96364d8735
No known key found for this signature in database
GPG Key ID: 272ED814BF63261F

View File

@ -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,
}
}