mirror of
https://github.com/vsariola/sointu.git
synced 2025-08-03 12:55:24 -04:00
feat: UI work to facilitate future improvements in midi-into-track-input
This commit is contained in:
@ -101,9 +101,7 @@ func NewTracker(model *tracker.Model) *Tracker {
|
||||
|
||||
func (t *Tracker) Main() {
|
||||
titleFooter := ""
|
||||
w := new(app.Window)
|
||||
w.Option(app.Title("Sointu Tracker"))
|
||||
w.Option(app.Size(unit.Dp(800), unit.Dp(600)))
|
||||
w := NewWindow()
|
||||
t.InstrumentEditor.Focus()
|
||||
recoveryTicker := time.NewTicker(time.Second * 30)
|
||||
t.Explorer = explorer.NewExplorer(w)
|
||||
@ -127,9 +125,7 @@ func (t *Tracker) Main() {
|
||||
}
|
||||
if !t.Quitted() {
|
||||
// TODO: uh oh, there's no way of canceling the destroyevent in gioui? so we create a new window just to show the dialog
|
||||
w = new(app.Window)
|
||||
w.Option(app.Title("Sointu Tracker"))
|
||||
w.Option(app.Size(unit.Dp(800), unit.Dp(600)))
|
||||
w = NewWindow()
|
||||
t.Explorer = explorer.NewExplorer(w)
|
||||
go eventLoop(w, events, acks)
|
||||
}
|
||||
@ -165,6 +161,16 @@ func (t *Tracker) Main() {
|
||||
t.quitWG.Done()
|
||||
}
|
||||
|
||||
func NewWindow() *app.Window {
|
||||
w := new(app.Window)
|
||||
w.Option(app.Title("Sointu Tracker"))
|
||||
w.Option(
|
||||
app.Size(unit.Dp(800), unit.Dp(600)),
|
||||
app.Fullscreen.Option(),
|
||||
)
|
||||
return w
|
||||
}
|
||||
|
||||
func eventLoop(w *app.Window, events chan<- event.Event, acks <-chan struct{}) {
|
||||
// Iterate window events, sending each to the old event loop and waiting for
|
||||
// a signal that processing is complete before iterating again.
|
||||
|
Reference in New Issue
Block a user