From be2aad1142bde494229d9d27d4123923aa578c1a Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Tue, 29 Apr 2025 14:44:48 -0500 Subject: overhaul ui * implement events instead of interfaces Interfaces and the wrappers head the problem that they could not support multiple events at once or only a single one without loosing the others. * add text input support for WASM on mobile A hidden html input is required to open the keyboard and receive the input. * improve the number choice * fix using the default number * add submit button only if a onclick method was provided --- go/ui/textInput_generic.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 go/ui/textInput_generic.go (limited to 'go/ui/textInput_generic.go') diff --git a/go/ui/textInput_generic.go b/go/ui/textInput_generic.go new file mode 100644 index 00000000..7102eb82 --- /dev/null +++ b/go/ui/textInput_generic.go @@ -0,0 +1,16 @@ +//go:build !wasm +// +build !wasm + +package ui + +func (ti *TextInput) Focus(focus bool) { + ti.focused = focus +} + +func (*TextInput) IsUpdatable() bool { return true } +func (ti *TextInput) Update() error { + if ti.focused { + } + + return nil +} -- cgit v1.2.3