diff --git a/README.md b/README.md index af6393e..41b96c2 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,7 @@ Add your issue here on GitHub. Feel free to get in touch if you have any questio - v0.4 (2018-01-12) - `TextView` now accepts color tags with any W3C color (including RGB hex values). + - Support for wide unicode characters. - v0.3 (2018-01-11) - Added masking to `InputField` and password entry to `Form`. - v0.2 (2018-01-10) diff --git a/demos/presentation/form.go b/demos/presentation/form.go index 0979caf..f2b0c0f 100644 --- a/demos/presentation/form.go +++ b/demos/presentation/form.go @@ -20,6 +20,7 @@ const form = `[green]package[white] main [red]"Administration"[white], }, [red]0[white], nil). [yellow]AddCheckbox[white]([red]"On vacation:"[white], false, nil). + [yellow]AddPasswordField[white]([red]"Password:"[white], [red]""[white], [red]10[white], [red]'*'[white], nil). [yellow]AddButton[white]([red]"Save"[white], [yellow]func[white]() { [blue]/* Save data */[white] }). [yellow]AddButton[white]([red]"Cancel"[white], [yellow]func[white]() { [blue]/* Cancel */[white] }) tview.[yellow]NewApplication[white](). @@ -34,8 +35,9 @@ func Form(nextSlide func()) (title string, content tview.Primitive) { AddInputField("Last name:", "", 20, nil, nil). AddDropDown("Role:", []string{"Engineer", "Manager", "Administration"}, 0, nil). AddCheckbox("On vacation:", false, nil). + AddPasswordField("Password:", "", 10, '*', nil). AddButton("Save", nextSlide). AddButton("Cancel", nextSlide) f.SetBorder(true).SetTitle("Employee Information") - return "Forms", Code(f, 36, 13, form) + return "Forms", Code(f, 36, 15, form) }