Silliness increase
This commit is contained in:
parent
46268c8d02
commit
48db645f9f
@ -183,6 +183,10 @@ func (element *TextBox) SetText (text string) {
|
||||
}
|
||||
}
|
||||
|
||||
func (element *TextBox) Value () (value string) {
|
||||
return string(element.text)
|
||||
}
|
||||
|
||||
func (element *TextBox) draw () {
|
||||
bounds := element.core.Bounds()
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
package main
|
||||
|
||||
import "git.tebibyte.media/sashakoshka/tomo"
|
||||
import "git.tebibyte.media/sashakoshka/tomo/popups"
|
||||
import "git.tebibyte.media/sashakoshka/tomo/layouts"
|
||||
import "git.tebibyte.media/sashakoshka/tomo/elements/basic"
|
||||
import _ "git.tebibyte.media/sashakoshka/tomo/backends/x"
|
||||
@ -17,9 +18,17 @@ func run () {
|
||||
|
||||
firstName := basic.NewTextBox("First name", "")
|
||||
lastName := basic.NewTextBox("Last name", "")
|
||||
lastName.SetEnabled(false)
|
||||
fingerLength := basic.NewTextBox("Length of fingers", "")
|
||||
button := basic.NewButton("Ok")
|
||||
|
||||
lastName.SetEnabled(false)
|
||||
button.OnClick (func () {
|
||||
popups.NewDialog (
|
||||
popups.DialogKindInfo,
|
||||
"Profile",
|
||||
firstName.Value() + " [REDACTED]'s fingers\n" +
|
||||
"measure in at " + fingerLength.Value() + " feet.")
|
||||
})
|
||||
|
||||
container.Adopt(basic.NewLabel("Choose your words carefully.", false), true)
|
||||
container.Adopt(firstName, false)
|
||||
|
Reference in New Issue
Block a user