From 83ce69a4785d6464fafd07e60b20b968529f018a Mon Sep 17 00:00:00 2001 From: Sam Anthony Date: Thu, 8 Feb 2024 15:32:34 -0500 Subject: move Focus to gui/widget package --- main.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index 740e4be..edd76fe 100644 --- a/main.go +++ b/main.go @@ -7,6 +7,7 @@ import ( "github.com/faiface/mainthread" "volute/gui" + "volute/gui/widget" "volute/gui/win" ) @@ -26,7 +27,7 @@ func run() { wg := new(sync.WaitGroup) defer wg.Wait() - focus := NewFocus([]int{1, POINTS, POINTS, POINTS, POINTS}) + focus := widget.NewFocus([]int{1, POINTS, POINTS, POINTS, POINTS}) defer focus.Close() displacementChan := make(chan uint) @@ -56,7 +57,9 @@ func run() { displacementChan, rpmChan, veChan, imapChan, actChan, flowChan, - &focus, mux, wg, + &focus, + mux, + wg, ) for i := 0; i < POINTS; i++ { @@ -73,7 +76,7 @@ func run() { eventLoop(env, &focus) } -func eventLoop(env gui.Env, focus *Focus) { +func eventLoop(env gui.Env, focus *widget.Focus) { for event := range env.Events() { switch event := event.(type) { case win.WiClose: -- cgit v1.2.3