izapple2/frontend/a2fyne/panelDevices.go
2020-10-17 23:59:52 +02:00

30 lines
473 B
Go

package main
import (
"fyne.io/fyne/widget"
)
type panelDevices struct {
s *state
w *widget.Box
joystick *panelJoystick
}
func newPanelDevices(s *state) *panelDevices {
var pd panelDevices
pd.s = s
pd.w = widget.NewVBox()
pd.joystick = newPanelJoystick()
pd.w.Append(pd.joystick.w)
var cards = s.a.GetCards()
for i, card := range cards {
if card != nil && card.GetName() != "" {
pd.w.Append(newPanelCard(i, card).w)
}
}
return &pd
}