func LoadDeck(deck string) (*Deck, error) {
	d := Deck{}
	dc, err := LoadConfig(deck)
	if err != nil {
		return nil, err
	}

	for _, k := range dc.Keys {
		w := NewWidget(k.Index, k.Widget.ID, k.Action, k.ActionHold, k.Widget.Config)
		d.Widgets = append(d.Widgets, w)
	}

	return &d, nil
}
// LoadDeck loads a deck configuration.
LoadDeck loads a deck configuration.
// LoadDeck loads a deck configuration .
func LoadDeck(deck string) (*Deck, error) {
	d := Deck{}
	dc, err := LoadConfig(deck)
	if err != nil {
		return nil, err
	}
	for _, k := range dc.Keys {
		w := NewWidget(k.Index, k.Widget.ID, k.Action, k.ActionHold, k.Widget.Config)
		d.Widgets = append(d.Widgets, w)
	}
	return &d, nil
}
func LoadDeck ( deck string ) ( * Deck , error ) { d := Deck { } dc , err := LoadConfig ( deck ) if err != nil { return nil , err } for _ , k := range dc . Keys { w := NewWidget ( k . Index , k . Widget . ID , k . Action , k . ActionHold , k . Widget . Config ) d . Widgets = append ( d . Widgets , w ) } return & d , nil }
LoadDeck loads a deck configuration.
LoadDeck loads a deck configuration .