(label, value string, fieldWidth int, mask rune, changed func(text string))
| 168 | } |
| 169 | |
| 170 | func (f *XForm) AddPasswordField(label, value string, fieldWidth int, mask rune, changed func(text string)) *XForm { |
| 171 | if mask == 0 { |
| 172 | mask = '*' |
| 173 | } |
| 174 | |
| 175 | f.AddFormItem(tview.NewInputField(). |
| 176 | SetFieldTextColor(tcell.ColorBlack). |
| 177 | SetLabel(label). |
| 178 | SetText(value). |
| 179 | SetFieldWidth(fieldWidth). |
| 180 | SetMaskCharacter(mask). |
| 181 | SetChangedFunc(changed)) |
| 182 | |
| 183 | return f |
| 184 | } |
| 185 | |
| 186 | func (f *XForm) AddDropDown(label string, options []string, initialOption int, selected func(option string, optionIndex int)) *XForm { |
| 187 | dropdown := tview.NewDropDown() |
no outgoing calls
no test coverage detected