mirror of
https://github.com/vsariola/sointu.git
synced 2026-02-22 16:13:13 -05:00
feat: first draft of multi-unit view
This commit is contained in:
@ -31,6 +31,7 @@ type DragList struct {
|
||||
swapped bool
|
||||
focused bool
|
||||
requestFocus bool
|
||||
onSelect func(index int)
|
||||
}
|
||||
|
||||
type FilledDragListStyle struct {
|
||||
@ -185,6 +186,9 @@ func (s FilledDragListStyle) Layout(gtx C) D {
|
||||
if !e.Modifiers.Contain(key.ModShift) {
|
||||
s.dragList.TrackerList.SetSelected2(index)
|
||||
}
|
||||
if s.dragList.onSelect != nil {
|
||||
s.dragList.onSelect(index)
|
||||
}
|
||||
gtx.Execute(key.FocusCmd{Tag: s.dragList})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user