1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

WTF-400 Add settings to the template (a settings template as yet to be created)

This commit is contained in:
Chris Cummer 2019-04-16 21:56:51 -07:00
parent 2807a2200e
commit d174bd1497

View File

@ -16,12 +16,16 @@ const HelpText = `
type Widget struct {
wtf.HelpfulWidget
wtf.TextWidget
settings *Settings
}
func NewWidget(app *tview.Application, pages *tview.Pages) *Widget {
func NewWidget(app *tview.Application, pages *tview.Pages, settings *Settings) *Widget {
widget := Widget{
HelpfulWidget: wtf.NewHelpfulWidget(app, pages, HelpText),
TextWidget: wtf.NewTextWidget(app, "{{(Title .Name)}}", "{{(Lower .Name)}}", true),
settings: settings,
}
widget.HelpfulWidget.SetView(widget.View)