mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-19 05:24:48 -04:00
feat(gioui): add confirmation dialog when deleting instrument
Closes #5
This commit is contained in:
@ -108,7 +108,14 @@ func (t *Tracker) layoutInstrumentHeader(gtx C) D {
|
||||
}
|
||||
}
|
||||
for t.DeleteInstrumentBtn.Clicked() {
|
||||
t.ConfirmInstrDelete.Visible = true
|
||||
}
|
||||
for t.ConfirmInstrDelete.BtnOk.Clicked() {
|
||||
t.DeleteInstrument(false)
|
||||
t.ConfirmInstrDelete.Visible = false
|
||||
}
|
||||
for t.ConfirmInstrDelete.BtnCancel.Clicked() {
|
||||
t.ConfirmInstrDelete.Visible = false
|
||||
}
|
||||
return Surface{Gray: 37, Focus: t.EditMode() == tracker.EditUnits || t.EditMode() == tracker.EditParameters}.Layout(gtx, header)
|
||||
}
|
||||
|
Reference in New Issue
Block a user