neofeels/main.go

27 lines
401 B
Go
Raw Normal View History

2025-01-05 16:40:26 +00:00
package main
import (
"git.tilde.town/nbsp/neofeels/app"
"git.tilde.town/nbsp/neofeels/ui"
)
func main() {
state, err := ui.New(app.NewMainMenu())
if err != nil {
panic(err)
}
defer state.Close()
loop:
for {
select {
case event := <-ui.Events:
state.HandleEvent(event)
case newState := <-ui.ViewChange:
state.HandleViewChange(newState)
case <-ui.Quit:
break loop
}
}
}