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 () {
|
func (element *TextBox) draw () {
|
||||||
bounds := element.core.Bounds()
|
bounds := element.core.Bounds()
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import "git.tebibyte.media/sashakoshka/tomo"
|
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/layouts"
|
||||||
import "git.tebibyte.media/sashakoshka/tomo/elements/basic"
|
import "git.tebibyte.media/sashakoshka/tomo/elements/basic"
|
||||||
import _ "git.tebibyte.media/sashakoshka/tomo/backends/x"
|
import _ "git.tebibyte.media/sashakoshka/tomo/backends/x"
|
||||||
@ -17,10 +18,18 @@ func run () {
|
|||||||
|
|
||||||
firstName := basic.NewTextBox("First name", "")
|
firstName := basic.NewTextBox("First name", "")
|
||||||
lastName := basic.NewTextBox("Last name", "")
|
lastName := basic.NewTextBox("Last name", "")
|
||||||
lastName.SetEnabled(false)
|
|
||||||
fingerLength := basic.NewTextBox("Length of fingers", "")
|
fingerLength := basic.NewTextBox("Length of fingers", "")
|
||||||
button := basic.NewButton("Ok")
|
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(basic.NewLabel("Choose your words carefully.", false), true)
|
||||||
container.Adopt(firstName, false)
|
container.Adopt(firstName, false)
|
||||||
container.Adopt(lastName, false)
|
container.Adopt(lastName, false)
|
||||||
|
Reference in New Issue
Block a user