func (m *MenuWidget) Init() (err error) {
	if err = m2s.Decode(m.options.Content, &m.menus); err != nil {
		return
	}
	h := m.buildHeader()
	m.headerHeight = len(h)
	m.envs = m.options.Envs
	lopt := &listable.ListWrapperOption{
		Title:         m.options.GetTitle(),
		RealHeight:    m.options.GetHeight(),
		Header:        h,
		Body:          m.buildBody(),
		LineHighLight: true,
	}
	m.renderer = listable.NewListWrapper(lopt)
	m.isReady = true
	return
}
// Init is the implementation of stack.Init
Init is the implementation of stack.Init
// Init is the implementation of stack . Init
func (m *MenuWidget) Init() (err error) {
	if err = m2s.Decode(m.options.Content, &m.menus); err != nil {
		return
	}
	h := m.buildHeader()
	m.headerHeight = len(h)
	m.envs = m.options.Envs
	lopt := &listable.ListWrapperOption{
		Title:         m.options.GetTitle(),
		RealHeight:    m.options.GetHeight(),
		Header:        h,
		Body:          m.buildBody(),
		LineHighLight: true,
	}
	m.renderer = listable.NewListWrapper(lopt)
	m.isReady = true
	return
}
func ( m * MenuWidget ) Init ( ) ( err error ) { if err = m2s . Decode ( m . options . Content , & m . menus ) ; err != nil { return } h := m . buildHeader ( ) m . headerHeight = len ( h ) m . envs = m . options . Envs lopt := & listable . ListWrapperOption { Title : m . options . GetTitle ( ) , RealHeight : m . options . GetHeight ( ) , Header : h , Body : m . buildBody ( ) , LineHighLight : true , } m . renderer = listable . NewListWrapper ( lopt ) m . isReady = true return }
Init is the implementation of stack.Init
Init is the implementation of stack . Init