mirror of
https://github.com/ivanizag/izapple2.git
synced 2025-01-10 12:30:17 +00:00
31 lines
499 B
Go
31 lines
499 B
Go
package main
|
|
|
|
import (
|
|
"fyne.io/fyne/v2"
|
|
"fyne.io/fyne/v2/container"
|
|
)
|
|
|
|
type panelDevices struct {
|
|
s *state
|
|
w *fyne.Container
|
|
joystick *panelJoystick
|
|
}
|
|
|
|
func newPanelDevices(s *state) *panelDevices {
|
|
var pd panelDevices
|
|
pd.s = s
|
|
pd.w = container.NewVBox()
|
|
|
|
pd.joystick = newPanelJoystick()
|
|
pd.w.Add(pd.joystick.w)
|
|
|
|
var cards = s.a.GetCards()
|
|
for i, card := range cards {
|
|
if card != nil && card.GetName() != "" {
|
|
pd.w.Add(newPanelCard(i, card).w)
|
|
}
|
|
}
|
|
|
|
return &pd
|
|
}
|