summaryrefslogtreecommitdiff
path: root/find.go
diff options
context:
space:
mode:
Diffstat (limited to 'find.go')
-rw-r--r--find.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/find.go b/find.go
index 9f849e7..e046161 100644
--- a/find.go
+++ b/find.go
@@ -18,6 +18,13 @@ func (n *Node) FindControl() *ui.Control {
}
func (n *Node) FindBox() *GuiBox {
+ if (n.box != nil) {
+ return n.box
+ }
+ if (n.parent != nil) {
+ p := n.parent
+ return p.box
+ }
return n.box
}