mirror of
https://github.com/ivanizag/izapple2.git
synced 2024-12-28 17:29:57 +00:00
30 lines
473 B
Go
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
|
|
}
|