diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2024-02-08 15:32:34 -0500 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2024-02-08 15:32:34 -0500 |
| commit | 83ce69a4785d6464fafd07e60b20b968529f018a (patch) | |
| tree | bd43809eb775b672b04b3a170a70144b70bdae23 /main.go | |
| parent | 5b74ac13ea875f0bb645dc0054319a6f1e08d966 (diff) | |
| download | volute-83ce69a4785d6464fafd07e60b20b968529f018a.zip | |
move Focus to gui/widget package
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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: |