fix(tracker/gioui): using keys to choose Unit Type and tab ordering

This commit is contained in:
5684185+vsariola@users.noreply.github.com
2025-06-26 00:33:18 +03:00
parent 192909328c
commit 18d7848367
4 changed files with 117 additions and 94 deletions

View File

@ -706,6 +706,15 @@ func (l *SearchResults) Iterate(yield UnitSearchYieldFunc) {
}
}
func (l *SearchResults) Item(index int) (name string, ok bool) {
for i, n := range l.Iterate {
if i == index {
return n, true
}
}
return "", false
}
func (l *SearchResults) Selected() int {
return max(min(l.d.UnitSearchIndex, l.Count()-1), 0)
}