From dfb7a47e8cccd82080de3d6ba97855eeb2be6593 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sat, 20 Jan 2024 19:32:30 -0600 Subject: log settings works again still dreaming of protobuf here go mod update show panic for now finally drop sending stuff for non-visable windows Signed-off-by: Jeff Carr --- common.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'common.go') diff --git a/common.go b/common.go index a46ecb5..7b9c162 100644 --- a/common.go +++ b/common.go @@ -115,6 +115,16 @@ func (n *Node) Int() int { return widget.GetInt(n.value) } +func (n *Node) SetBool(b bool) { + switch n.WidgetType { + case widget.Checkbox: + n.checked = b + n.value = b + default: + log.Warn("WidgetType not bool", n.WidgetType, n.id) + } +} + func (n *Node) String() string { if !n.Ready() { return "" @@ -321,6 +331,12 @@ func (n *Node) Ready() bool { return true } +// returns the root of the binary tree +// change the names to 'Tree' as I think the name is better +func TreeRoot() *Node { + return me.rootNode +} + // // // DEPRECATE / REDO / SORT OUT THIS STUFF -- cgit v1.2.3