fix context

This commit is contained in:
2019-11-13 02:59:58 +03:00
parent e0b4d000d3
commit 8b4844211b
3 changed files with 8 additions and 6 deletions

View File

@ -14,6 +14,7 @@ import (
"lab.zaar.be/thefish/alchemyst-go/ui"
"lab.zaar.be/thefish/alchemyst-go/ui/mainwindow"
"lab.zaar.be/thefish/alchemyst-go/util"
"lab.zaar.be/thefish/alchemyst-go/util/appctx"
blt "lab.zaar.be/thefish/bearlibterminal"
"os"
"runtime"
@ -57,7 +58,7 @@ func main() {
var logger = log.Output(zerolog.ConsoleWriter{Out: os.Stdout, TimeFormat: time.RFC3339}).Level(logLevels[config.Verbosity])
// set up context
mainCtx := util.NewClientContext(config, &logger)
mainCtx := appctx.NewClientContext(config, &logger)
//set up main window
mw := mainwindow.Init(mainCtx)
@ -230,7 +231,7 @@ func setupLayers(mainwindow *mainwindow.MainWindow) {
mainwindow.AddLayer("menu", 3, "white")
}
func decodeInput(ctx util.ClientCtx, baseLayer *mainwindow.Layer) {
func decodeInput(ctx appctx.ClientCtx, baseLayer *mainwindow.Layer) {
var exit = false
var waitForWCspam = true
for !exit {